Check if new value is different from the current one.

In AccountState::setDesktopNotificationsAllowed.

Signed-off-by: Camila <hello@camila.codes>
This commit is contained in:
Camila 2021-04-26 20:42:21 +02:00 committed by Camila (Rebase PR Action)
parent f7e9e31bc9
commit 93227ab08b

View File

@ -229,6 +229,10 @@ bool AccountState::isDesktopNotificationsAllowed() const
void AccountState::setDesktopNotificationsAllowed(bool isAllowed)
{
if (_isDesktopNotificationsAllowed == isAllowed) {
return;
}
_isDesktopNotificationsAllowed = isAllowed;
emit desktopNotificationsAllowedChanged();
}