From 93227ab08bb7eb9bf550712fb0c8747cd301ca75 Mon Sep 17 00:00:00 2001 From: Camila Date: Mon, 26 Apr 2021 20:42:21 +0200 Subject: [PATCH] Check if new value is different from the current one. In AccountState::setDesktopNotificationsAllowed. Signed-off-by: Camila --- src/gui/accountstate.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/accountstate.cpp b/src/gui/accountstate.cpp index 0c80266bdd..1abbf6fabe 100644 --- a/src/gui/accountstate.cpp +++ b/src/gui/accountstate.cpp @@ -229,6 +229,10 @@ bool AccountState::isDesktopNotificationsAllowed() const void AccountState::setDesktopNotificationsAllowed(bool isAllowed) { + if (_isDesktopNotificationsAllowed == isAllowed) { + return; + } + _isDesktopNotificationsAllowed = isAllowed; emit desktopNotificationsAllowedChanged(); }