mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
Prevent call dialogs from being presented when do not disturb is set as the user status
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
This commit is contained in:
parent
d7217d1c07
commit
281e50f4cd
1 changed files with 10 additions and 2 deletions
|
@ -130,10 +130,18 @@ void User::slotBuildNotificationDisplay(const ActivityList &list)
|
||||||
|
|
||||||
void User::slotBuildIncomingCallDialogs(const ActivityList &list)
|
void User::slotBuildIncomingCallDialogs(const ActivityList &list)
|
||||||
{
|
{
|
||||||
const auto systray = Systray::instance();
|
|
||||||
const ConfigFile cfg;
|
const ConfigFile cfg;
|
||||||
|
const auto userStatus = _account->account()->userStatusConnector()->userStatus().state();
|
||||||
|
if (userStatus == OCC::UserStatus::OnlineStatus::DoNotDisturb ||
|
||||||
|
!cfg.optionalServerNotifications() ||
|
||||||
|
!cfg.showCallNotifications() ||
|
||||||
|
!isDesktopNotificationsAllowed()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if(systray && cfg.showCallNotifications()) {
|
const auto systray = Systray::instance();
|
||||||
|
|
||||||
|
if(systray) {
|
||||||
for(const auto &activity : list) {
|
for(const auto &activity : list) {
|
||||||
systray->createCallDialog(activity);
|
systray->createCallDialog(activity);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue