From 79a3fac84dbd0110279d59ff0f3a42e4f59e992c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Sun, 2 Jun 2019 22:22:34 -0400
Subject: [PATCH] registration: do not show dialog at end of registration

Change-Id: I295292b0f716bee6e7b710662271866780461c88
---
 src/usernameregistrationbox.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/usernameregistrationbox.cpp b/src/usernameregistrationbox.cpp
index 8805a67f..53a54e14 100644
--- a/src/usernameregistrationbox.cpp
+++ b/src/usernameregistrationbox.cpp
@@ -408,6 +408,7 @@ build_view(UsernameRegistrationBox *view, gboolean register_button)
                 &lrc::api::NewAccountModel::nameRegistrationEnded,
                 [=] (const std::string& accountId, lrc::api::account::RegisterNameStatus status, const std::string& name) {
                     if (accountId != (*priv->accountInfo_)->id) return;
+                    if (name == "") return;
                     gtk_spinner_stop(GTK_SPINNER(priv->spinner));
                     gtk_widget_hide(priv->spinner);
                     gtk_widget_set_sensitive(priv->entry_username, TRUE);
-- 
GitLab