From 912fd3f595f73de19a7c1cf6a668612979d42603 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Fri, 16 Jul 2021 16:23:32 -0400
Subject: [PATCH] accountcombobox: only show username if different from best
 alias

This follow changes from lrc fixing getBestId.

Change-Id: I6ef298dfbcac9095cd5557c7b1d3caf42c0c3f3e
---
 src/mainview/components/AccountComboBox.qml     | 2 +-
 src/mainview/components/AccountItemDelegate.qml | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mainview/components/AccountComboBox.qml b/src/mainview/components/AccountComboBox.qml
index 54faf20d6..6e41ae7b7 100644
--- a/src/mainview/components/AccountComboBox.qml
+++ b/src/mainview/components/AccountComboBox.qml
@@ -158,7 +158,7 @@ Label {
                 Layout.fillWidth: true
                 Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
 
-                visible: text.length
+                visible: text.length && text != userAliasText.text
 
                 text:  AccountListModel.data(AccountListModel.index(0,0),
                                              AccountList.Username)
diff --git a/src/mainview/components/AccountItemDelegate.qml b/src/mainview/components/AccountItemDelegate.qml
index 4343bcef4..4f6dcf2c9 100644
--- a/src/mainview/components/AccountItemDelegate.qml
+++ b/src/mainview/components/AccountItemDelegate.qml
@@ -79,7 +79,7 @@ ItemDelegate {
                 Layout.fillWidth: true
                 Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
 
-                visible: text.length
+                visible: text.length && Alias != Username
 
                 text: Username
                 font.pointSize: JamiTheme.textFontSize
-- 
GitLab