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