From 0e07f9cee759d8d6b8d4aaf12fb73f0886c8b11c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois-Simon=20Fauteux-Chapleau?=
 <francois-simon.fauteux-chapleau@savoirfairelinux.com>
Date: Mon, 22 Jul 2024 10:15:38 -0400
Subject: [PATCH] JamiIdentifier: fix binding for Jami ID

GitLab: #1805
Change-Id: Ic847bb61ccb2c75873d91a35cd851caaedaf518d
---
 src/app/commoncomponents/JamiIdentifier.qml | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/app/commoncomponents/JamiIdentifier.qml b/src/app/commoncomponents/JamiIdentifier.qml
index 45498194d..9d797c2ed 100644
--- a/src/app/commoncomponents/JamiIdentifier.qml
+++ b/src/app/commoncomponents/JamiIdentifier.qml
@@ -121,10 +121,7 @@ Item {
                     font.pixelSize : text.length > 16 ? JamiTheme.jamiIdSmallFontSize : JamiTheme.bigFontSize
                     property string registeredName: CurrentAccount.registeredName
                     property string infohash: CurrentAccount.uri
-                    text: registeredName ? registeredName : infohash
-                    onRegisteredNameChanged: {
-                        text = registeredName ? registeredName : infohash
-                    }
+                    text: (btnId.clicked && registeredName) ? registeredName : infohash
                 }
             }
         }
@@ -231,11 +228,9 @@ Item {
                     toolTipText: JamiStrings.identifierURI
                     onClicked: {
                         if (clicked) {
-                            usernameLabel.text = Qt.binding(function() {return CurrentAccount.uri} );
                             usernameTextEdit.staticText = Qt.binding(function() {return CurrentAccount.uri} );
                             btnId.toolTipText = JamiStrings.identifierRegisterName;
                         } else {
-                            usernameLabel.text = Qt.binding(function() {return CurrentAccount.registeredName} );
                             usernameTextEdit.staticText = Qt.binding(function() {return CurrentAccount.registeredName} );
                             btnId.toolTipText = JamiStrings.identifierURI;
                         }
-- 
GitLab