From b9e10b025ec35f58166fc13a97864d352e98b3ba Mon Sep 17 00:00:00 2001
From: Ming Rui Zhang <mingrui.zhang@savoirfairelinux.com>
Date: Fri, 25 Sep 2020 12:08:32 -0400
Subject: [PATCH] wizardview: clear username line edit when clicking on skip
 button

It is to prevent using the text in username line edit to create an account
when the user does not want to register it.

Change-Id: Icae024a82141ea06dd6b4c5413de2ad9725433b5
---
 src/wizardview/components/CreateAccountPage.qml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/wizardview/components/CreateAccountPage.qml b/src/wizardview/components/CreateAccountPage.qml
index 8a6737062..49c3ca6aa 100644
--- a/src/wizardview/components/CreateAccountPage.qml
+++ b/src/wizardview/components/CreateAccountPage.qml
@@ -209,8 +209,11 @@ Rectangle {
                     pressedColor: JamiTheme.buttonTintedGreyPressed
                     outlined: true
 
-                    onClicked: createAccountStack.currentIndex =
-                               createAccountStack.currentIndex + 1
+                    onClicked: {
+                        usernameEdit.clear()
+                        createAccountStack.currentIndex =
+                                createAccountStack.currentIndex + 1
+                    }
                 }
 
                 AccountCreationStepIndicator {
-- 
GitLab