2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45: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

@@ -715,23 +715,16 @@ void NotificationData::notificationReplied(
} // namespace
bool SkipAudio() {
return Inhibited();
bool SkipAudioForCustom() {
return false;
}
bool SkipToast() {
// Do not skip native notifications because of Do not disturb.
// They respect this setting anyway.
if ((Core::App().settings().nativeNotifications() && Supported())
|| Enforced()) {
return false;
}
return Inhibited();
bool SkipToastForCustom() {
return false;
}
bool SkipFlashBounce() {
return Inhibited();
bool SkipFlashBounceForCustom() {
return false;
}
bool Supported() {
@@ -1030,5 +1023,17 @@ void Manager::doClearFromSession(not_null<Main::Session*> session) {
_private->clearFromSession(session);
}
bool Manager::doSkipAudio() const {
return Inhibited();
}
bool Manager::doSkipToast() const {
return false;
}
bool Manager::doSkipFlashBounce() const {
return Inhibited();
}
} // namespace Notifications
} // namespace Platform

View File

@@ -34,6 +34,9 @@ protected:
void doClearAllFast() override;
void doClearFromHistory(not_null<History*> history) override;
void doClearFromSession(not_null<Main::Session*> session) override;
bool doSkipAudio() const override;
bool doSkipToast() const override;
bool doSkipFlashBounce() const override;
private:
class Private;