Skip to content
Snippets Groups Projects
Commit 03d310fc authored by Sébastien Blin's avatar Sébastien Blin
Browse files

notifications: fix notification for multi-devices

Change-Id: I75e617eb84d96d2afa0b43d6c50b5d7832ec4012
parent 917dc967
No related branches found
No related tags found
No related merge requests found
...@@ -163,10 +163,11 @@ ConversationsAdapter::onNewUnreadInteraction(const QString& accountId, ...@@ -163,10 +163,11 @@ ConversationsAdapter::onNewUnreadInteraction(const QString& accountId,
const QString& interactionId, const QString& interactionId,
const interaction::Info& interaction) const interaction::Info& interaction)
{ {
if (!interaction.authorUri.isEmpty() if (!QApplication::focusWindow() || accountId != lrcInstance_->get_currentAccountId()
&& (!QApplication::focusWindow() || accountId != lrcInstance_->get_currentAccountId() || convUid != lrcInstance_->get_selectedConvUid()) {
|| convUid != lrcInstance_->get_selectedConvUid())) {
auto& accountInfo = lrcInstance_->getAccountInfo(accountId); auto& accountInfo = lrcInstance_->getAccountInfo(accountId);
if (interaction.authorUri == accountInfo.profileInfo.uri)
return;
auto from = accountInfo.contactModel->bestNameForContact(interaction.authorUri); auto from = accountInfo.contactModel->bestNameForContact(interaction.authorUri);
auto preferences = accountInfo.conversationModel->getConversationPreferences(convUid); auto preferences = accountInfo.conversationModel->getConversationPreferences(convUid);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment