From 835841442d6d6c91842396e008f20079ce212d7d Mon Sep 17 00:00:00 2001
From: ababi <albert.babi@savoirfairelinux.com>
Date: Tue, 22 Sep 2020 11:27:20 +0200
Subject: [PATCH] smartlist: fix wrong contact selection

- unselect smartlist before contact selection. This makes possible selecting the same index when smartlist changes, i. e., when searching contacts or switching to invitations menu

Gitlab: #96
Change-Id: Id402389a3b80771f37946323d4112a5324612d33
---
 .../components/ConversationSmartListViewItemDelegate.qml         | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mainview/components/ConversationSmartListViewItemDelegate.qml b/src/mainview/components/ConversationSmartListViewItemDelegate.qml
index 9d9084ccd..feb051a80 100644
--- a/src/mainview/components/ConversationSmartListViewItemDelegate.qml
+++ b/src/mainview/components/ConversationSmartListViewItemDelegate.qml
@@ -198,6 +198,7 @@ ItemDelegate {
                 userProfile.contactPicBase64 = Picture
                 smartListContextMenu.openMenu()
             } else if (mouse.button === Qt.LeftButton) {
+                conversationSmartListView.currentIndex = -1
                 conversationSmartListView.currentIndex = index
             }
         }
-- 
GitLab