1
0
Fork 0
mirror of https://git.jami.net/savoirfairelinux/jami-client-qt.git synced 2025-04-21 21:52:03 +02:00

notifications: avoid unnecessary account and conversation check

- notifications were not shown when last notification received was from the same account and conversation

Gitlab: #142

Change-Id: I7d66199384c2af72b7668bd07d85be0c6bebb3e9
This commit is contained in:
ababi 2020-10-12 11:00:03 +02:00 committed by Albert Babí Oller
parent ce8783f753
commit b4b56aec4b
2 changed files with 0 additions and 13 deletions

View file

@ -34,9 +34,6 @@ public:
return *instance_;
}
inline static QString notificationAccountId {};
inline static QString notificationConvUid {};
template<typename Func>
static void connectClicked(Func&& onClicked)
{

View file

@ -297,18 +297,8 @@ Utils::showNotification(const QString& message,
return;
}
if (accountId == GlobalSystemTray::notificationAccountId
&& convUid == GlobalSystemTray::notificationConvUid) {
GlobalSystemTray::notificationAccountId.clear();
GlobalSystemTray::notificationConvUid.clear();
return;
}
GlobalSystemTray::connectClicked(std::move(onClicked));
GlobalSystemTray::notificationAccountId = accountId;
GlobalSystemTray::notificationConvUid = convUid;
if (from.isEmpty())
GlobalSystemTray::instance().showMessage(message, "", QIcon(":images/jami.png"));
else