Skip to content
Snippets Groups Projects
Commit b4b56aec authored by Albert  Babí Oller's avatar Albert Babí Oller Committed by Albert Babí Oller
Browse files

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
parent ce8783f7
No related branches found
No related tags found
No related merge requests found
...@@ -34,9 +34,6 @@ public: ...@@ -34,9 +34,6 @@ public:
return *instance_; return *instance_;
} }
inline static QString notificationAccountId {};
inline static QString notificationConvUid {};
template<typename Func> template<typename Func>
static void connectClicked(Func&& onClicked) static void connectClicked(Func&& onClicked)
{ {
......
...@@ -297,18 +297,8 @@ Utils::showNotification(const QString& message, ...@@ -297,18 +297,8 @@ Utils::showNotification(const QString& message,
return; return;
} }
if (accountId == GlobalSystemTray::notificationAccountId
&& convUid == GlobalSystemTray::notificationConvUid) {
GlobalSystemTray::notificationAccountId.clear();
GlobalSystemTray::notificationConvUid.clear();
return;
}
GlobalSystemTray::connectClicked(std::move(onClicked)); GlobalSystemTray::connectClicked(std::move(onClicked));
GlobalSystemTray::notificationAccountId = accountId;
GlobalSystemTray::notificationConvUid = convUid;
if (from.isEmpty()) if (from.isEmpty())
GlobalSystemTray::instance().showMessage(message, "", QIcon(":images/jami.png")); GlobalSystemTray::instance().showMessage(message, "", QIcon(":images/jami.png"));
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment