chore: remove unused timegates (#5361)

This commit is contained in:
nerix
2024-05-25 13:12:04 +02:00
committed by GitHub
parent ec6b1ef24d
commit 491b6db72f
4 changed files with 3 additions and 139 deletions
-90
View File
@@ -1161,96 +1161,6 @@ void GeneralPage::initLayout(GeneralPageView &layout)
"@mention for the related thread. If the reply context is hidden, "
"these mentions will never be stripped.");
// Helix timegate settings
auto helixTimegateGetValue = [](auto val) {
switch (val)
{
case HelixTimegateOverride::Timegate:
return "Timegate";
case HelixTimegateOverride::AlwaysUseIRC:
return "Always use IRC";
case HelixTimegateOverride::AlwaysUseHelix:
return "Always use Helix";
default:
return "Timegate";
}
};
auto helixTimegateSetValue = [](auto args) {
const auto &v = args.value;
if (v == "Timegate")
{
return HelixTimegateOverride::Timegate;
}
if (v == "Always use IRC")
{
return HelixTimegateOverride::AlwaysUseIRC;
}
if (v == "Always use Helix")
{
return HelixTimegateOverride::AlwaysUseHelix;
}
qCDebug(chatterinoSettings) << "Unknown Helix timegate override value"
<< v << ", using default value Timegate";
return HelixTimegateOverride::Timegate;
};
auto *helixTimegateRaid =
layout.addDropdown<std::underlying_type<HelixTimegateOverride>::type>(
"Helix timegate /raid behaviour",
{"Timegate", "Always use IRC", "Always use Helix"},
s.helixTimegateRaid,
helixTimegateGetValue, //
helixTimegateSetValue, //
false);
helixTimegateRaid->setMinimumWidth(
helixTimegateRaid->minimumSizeHint().width());
auto *helixTimegateWhisper =
layout.addDropdown<std::underlying_type<HelixTimegateOverride>::type>(
"Helix timegate /w behaviour",
{"Timegate", "Always use IRC", "Always use Helix"},
s.helixTimegateWhisper,
helixTimegateGetValue, //
helixTimegateSetValue, //
false);
helixTimegateWhisper->setMinimumWidth(
helixTimegateWhisper->minimumSizeHint().width());
auto *helixTimegateVIPs =
layout.addDropdown<std::underlying_type<HelixTimegateOverride>::type>(
"Helix timegate /vips behaviour",
{"Timegate", "Always use IRC", "Always use Helix"},
s.helixTimegateVIPs,
helixTimegateGetValue, //
helixTimegateSetValue, //
false);
helixTimegateVIPs->setMinimumWidth(
helixTimegateVIPs->minimumSizeHint().width());
auto *helixTimegateCommercial =
layout.addDropdown<std::underlying_type<HelixTimegateOverride>::type>(
"Helix timegate /commercial behaviour",
{"Timegate", "Always use IRC", "Always use Helix"},
s.helixTimegateCommercial,
helixTimegateGetValue, //
helixTimegateSetValue, //
false);
helixTimegateCommercial->setMinimumWidth(
helixTimegateCommercial->minimumSizeHint().width());
auto *helixTimegateModerators =
layout.addDropdown<std::underlying_type<HelixTimegateOverride>::type>(
"Helix timegate /mods behaviour",
{"Timegate", "Always use IRC", "Always use Helix"},
s.helixTimegateModerators,
helixTimegateGetValue, //
helixTimegateSetValue, //
false);
helixTimegateModerators->setMinimumWidth(
helixTimegateModerators->minimumSizeHint().width());
layout.addDropdownEnumClass<ChatSendProtocol>(
"Chat send protocol", qmagicenum::enumNames<ChatSendProtocol>(),
s.chatSendProtocol,