mirror of
https://github.com/savoirfairelinux/jami-client-qt.git
synced 2025-12-18 00:36:35 +08: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:
@@ -34,9 +34,6 @@ public:
|
||||
return *instance_;
|
||||
}
|
||||
|
||||
inline static QString notificationAccountId {};
|
||||
inline static QString notificationConvUid {};
|
||||
|
||||
template<typename Func>
|
||||
static void connectClicked(Func&& onClicked)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user