Browse Source

Once the user logged in in the cloudContent page ensure that it moves to the next.

This fixes the weird situation that when logging in, the screen was still visible
and the user could still press the create / sign in button.

CURA-6057
Jaime van Kessel 6 years ago
parent
commit
1d6d3d729d
1 changed files with 12 additions and 0 deletions
  1. 12 0
      resources/qml/WelcomePages/CloudContent.qml

+ 12 - 0
resources/qml/WelcomePages/CloudContent.qml

@@ -15,6 +15,18 @@ Item
 {
     UM.I18nCatalog { id: catalog; name: "cura" }
 
+    property bool isLoggedIn: Cura.API.account.isLoggedIn
+
+    onIsLoggedInChanged:
+    {
+        if(isLoggedIn)
+        {
+            // If the user created an account or logged in by pressing any button on this page, all the actions that
+            // need / can be done by this page are completed, so we can just go to the next (if any).
+            base.showNextPage()
+        }
+    }
+
     Label
     {
         id: titleLabel