feat: globally suppress highlight notifications#5629
feat: globally suppress highlight notifications#5629jupjohn wants to merge 14 commits intoChatterino:masterfrom
Conversation
|
Tested the following against 271d57e (pre-rebase) and works as expected: Hotkey usage:
Window context menu checkbox connection:
Window context menu checkbox action:
|
|
Would anyone be against me NOT implementing visual feedback to indicate the state of notification suppression (i.e. show an icon next in the notebook header like stream mode?) It would be nice from a user-perspective, but I'd rather get the core functionality in first. |
271d57e to
582f452
Compare
| {"toggleGlobalNotificationSuppression", | ||
| ActionDefinition{ | ||
| .displayName = "Toggle muting of all notifications", | ||
| .argumentDescription = "[on, off, or toggle. default: toggle]", | ||
| .minCountArguments = 0, | ||
| .maxCountArguments = 1, | ||
| .possibleArguments{{"Toggle", {}}, | ||
| {"Enable notification muting", {"on"}}, | ||
| {"Disable notification muting", {"off"}}}, | ||
| .argumentsPrompt = "New value:", | ||
| .argumentsPromptHover = "Should all highlight notifications be " | ||
| "enabled, disabled, or toggled.", | ||
| }}, |
There was a problem hiding this comment.
Bikeshed: Do we want this as a "negative" option? "Disable notification muting" is (kind-of) a double-negative - you're enabling notifications.
Oh, also: what about live notifications? "toggleGlobalNotificationSuppression" sounds like it would disable everything.
There was a problem hiding this comment.
Good point! Happy to run with "mute notifications" and "unmute notifications" 👍
|
I'll be implementing the visual feedback in this PR as it's not being included in 2.5.2 (discussed on pajlada's stream a while back) |
513e190 to
1319caa
Compare
| // do not disturb | ||
| this->doNotDisturbIcon_ = this->addCustomButton(); | ||
| QObject::connect(this->doNotDisturbIcon_, &NotebookButton::leftClicked, | ||
| [this] { |
There was a problem hiding this comment.
warning: lambda capture 'this' is not used [clang-diagnostic-unused-lambda-capture]
| [this] { | |
| [] { |
|
|
||
| // do not disturb | ||
| this->doNotDisturbTitlebarIcon_ = | ||
| this->addTitleBarButton(TitleBarButtonStyle::DoNotDisturb, [this] { |
There was a problem hiding this comment.
warning: lambda capture 'this' is not used [clang-diagnostic-unused-lambda-capture]
| this->addTitleBarButton(TitleBarButtonStyle::DoNotDisturb, [this] { | |
| this->addTitleBarButton(TitleBarButtonStyle::DoNotDisturb, [] { |


This PR aims to implement global suppression of highlight notifications through a "Do Not Disturb"-like feature. I wanted to get this out of my head before I lost interest in it.
TODO:
Implements #5628.