← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~mzanetti/reminders-app/single-account-setup into lp:reminders-app

 

Michael Zanetti has proposed merging lp:~mzanetti/reminders-app/single-account-setup into lp:reminders-app.

Commit message:
Only keep a single AccountSetup declaration

Requested reviews:
  Ubuntu Reminders app developers (reminders-app-dev)

For more details, see:
https://code.launchpad.net/~mzanetti/reminders-app/single-account-setup/+merge/251649
-- 
Your team Ubuntu Reminders app developers is requested to review the proposed merge of lp:~mzanetti/reminders-app/single-account-setup into lp:reminders-app.
=== modified file 'src/app/qml/reminders.qml'
--- src/app/qml/reminders.qml	2015-03-01 22:32:41 +0000
+++ src/app/qml/reminders.qml	2015-03-03 20:07:09 +0000
@@ -104,7 +104,7 @@
             accountPage.destroy(100)
         }
         var component = Qt.createComponent(Qt.resolvedUrl("ui/AccountSelectorPage.qml"));
-        accountPage = component.createObject(root, { accounts: accounts, unauthorizedAccounts: unauthorizedAccounts });
+        accountPage = component.createObject(root, { accounts: accounts, unauthorizedAccounts: unauthorizedAccounts, oaSetup: setup });
         accountPage.accountSelected.connect(function(username, handle) { accountService.startAuthentication(username, handle); pagestack.pop(); root.accountPage = null });
         pagestack.push(accountPage);
     }
@@ -548,6 +548,7 @@
                 page: AccountSelectorPage {
                     accounts: accounts
                     unauthorizedAccounts: true
+                    oaSetup: setup
                     onAccountSelected: {
                         accountService.startAuthentication(username, handle)
                         rootTabs.selectedTabIndex = 0;
@@ -593,6 +594,12 @@
         }
     }
 
+    Setup {
+        id: setup
+        applicationId: "com.ubuntu.reminders_reminders"
+        providerId: useSandbox ? "com.ubuntu.reminders_evernote-account-plugin-sandbox" : "com.ubuntu.reminders_evernote-account-plugin"
+    }
+
     Component {
         id: noAccountDialog
         Dialog {
@@ -613,12 +620,6 @@
                 }
             }
 
-            Setup {
-                id: setup
-                applicationId: "com.ubuntu.reminders_reminders"
-                providerId: useSandbox ? "com.ubuntu.reminders_evernote-account-plugin-sandbox" : "com.ubuntu.reminders_evernote-account-plugin"
-            }
-
             RowLayout {
                 Button {
                     objectName: "openAccountButton"

=== modified file 'src/app/qml/ui/AccountSelectorPage.qml'
--- src/app/qml/ui/AccountSelectorPage.qml	2015-03-01 22:11:43 +0000
+++ src/app/qml/ui/AccountSelectorPage.qml	2015-03-03 20:07:09 +0000
@@ -30,14 +30,10 @@
 
     property alias accounts: optionSelector.model
     property bool unauthorizedAccounts
+    property var oaSetup: null
 
     signal accountSelected(string username, var handle)
 
-    Setup {
-        id: setup
-        applicationId: "com.ubuntu.reminders_reminders"
-        providerId: useSandbox ? "evernote-sandbox" : "evernote"
-    }
 
     Column {
         anchors { fill: parent; margins: units.gu(2) }
@@ -94,7 +90,7 @@
             width: parent.width - units.gu(2)
             text: i18n.tr("Add new account")
             color: UbuntuColors.orange
-            onClicked: setup.exec()
+            onClicked: root.oaSetup.exec()
         }
      }
 


Follow ups