Add setting to only show tabs with live channels (#4358)

Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
Daniel Sage
2023-06-11 02:34:28 -07:00
committed by GitHub
parent c907f2b170
commit 4361790fbd
13 changed files with 412 additions and 136 deletions
+24
View File
@@ -199,6 +199,30 @@ void GeneralPage::initLayout(GeneralPageView &layout)
tabDirectionDropdown->setMinimumWidth(
tabDirectionDropdown->minimumSizeHint().width());
layout.addDropdown<std::underlying_type<NotebookTabVisibility>::type>(
"Tab visibility", {"All tabs", "Only live tabs"}, s.tabVisibility,
[](auto val) {
switch (val)
{
case NotebookTabVisibility::LiveOnly:
return "Only live tabs";
case NotebookTabVisibility::AllTabs:
default:
return "All tabs";
}
},
[](auto args) {
if (args.value == "Only live tabs")
{
return NotebookTabVisibility::LiveOnly;
}
else
{
return NotebookTabVisibility::AllTabs;
}
},
false, "Choose which tabs are visible in the notebook");
layout.addCheckbox(
"Show message reply context", s.hideReplyContext, true,
"This setting will only affect how messages are shown. You can reply "