don't show settings button during account wizard
The issue was that handle_account_migrations() was being called
after show_account_creation_wizard(), and since there were no
accounts to migrate, handle_account_migrations() made the settings
button visible. If the user has no Ring accounts, there is no
reason to call handle_account_migrations(), which fixes this
issue.
Change-Id: I0d19afde50948528199fff01605b1f467ed686e3
Reviewed-by: Nicolas Jäger <nicolas.jager@savoirfairelinux.com>
diff --git a/src/ringmainwindow.cpp b/src/ringmainwindow.cpp
index 3773dad..051e397 100644
--- a/src/ringmainwindow.cpp
+++ b/src/ringmainwindow.cpp
@@ -1129,14 +1129,6 @@
priv->vbox_call_view,
CALL_VIEW_NAME);
- if (has_ring_account()) {
- /* user has ring account, so show the call view right away */
- gtk_stack_set_visible_child(GTK_STACK(priv->stack_main_view), priv->vbox_call_view);
- } else {
- /* user has to create the ring account */
- show_account_creation_wizard(win);
- }
-
/* init the settings views */
priv->account_settings_view = account_view_new();
gtk_stack_add_named(GTK_STACK(priv->stack_main_view), priv->account_settings_view, ACCOUNT_SETTINGS_VIEW_NAME);
@@ -1212,7 +1204,15 @@
/* init chat webkit container so that it starts loading before the first time we need it*/
get_webkit_chat_container(win);
- handle_account_migrations(win);
+ if (has_ring_account()) {
+ /* user has ring account, so show the call view right away */
+ gtk_stack_set_visible_child(GTK_STACK(priv->stack_main_view), priv->vbox_call_view);
+
+ handle_account_migrations(win);
+ } else {
+ /* user has to create the ring account */
+ show_account_creation_wizard(win);
+ }
}
static void