2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Respect Focus Assist only for native notifications.

Fixes #16215.
This commit is contained in:
John Preston
2021-04-28 11:20:39 +04:00
parent 175f3d7a38
commit 728b1efb9a
11 changed files with 287 additions and 227 deletions

View File

@@ -202,6 +202,16 @@ public:
[[nodiscard]] virtual ManagerType type() const = 0;
[[nodiscard]] bool skipAudio() const {
return doSkipAudio();
}
[[nodiscard]] bool skipToast() const {
return doSkipToast();
}
[[nodiscard]] bool skipFlashBounce() const {
return doSkipFlashBounce();
}
virtual ~Manager() = default;
protected:
@@ -218,6 +228,9 @@ protected:
virtual void doClearFromItem(not_null<HistoryItem*> item) = 0;
virtual void doClearFromHistory(not_null<History*> history) = 0;
virtual void doClearFromSession(not_null<Main::Session*> session) = 0;
virtual bool doSkipAudio() const = 0;
virtual bool doSkipToast() const = 0;
virtual bool doSkipFlashBounce() const = 0;
[[nodiscard]] virtual bool forceHideDetails() const {
return false;
}
@@ -298,6 +311,15 @@ protected:
}
void doClearFromSession(not_null<Main::Session*> session) override {
}
bool doSkipAudio() const {
return false;
}
bool doSkipToast() const {
return false;
}
bool doSkipFlashBounce() const {
return false;
}
};