Merge lp:~mikemc/ubuntuone-credentials/back-delete-fix into lp:ubuntuone-credentials

Proposed by Mike McCracken
Status: Merged
Approved by: dobey
Approved revision: 71
Merged at revision: 70
Proposed branch: lp:~mikemc/ubuntuone-credentials/back-delete-fix
Merge into: lp:ubuntuone-credentials
Diff against target: 43 lines (+3/-5)
2 files modified
online-accounts-provider/Main.qml (+3/-3)
online-accounts-provider/NewAccount.qml (+0/-2)
To merge this branch: bzr merge lp:~mikemc/ubuntuone-credentials/back-delete-fix
Reviewer Review Type Date Requested Status
dobey (community) Approve
PS Jenkins bot continuous-integration Approve
Roberto Alsina (community) Approve
Review via email: mp+189975@code.launchpad.net

Commit message

- Fix behavior of back button on existing account detail page (LP: #1237006)

Description of the change

- Fix behavior of back button on existing account detail page (LP: #1237006)

When the back button is pressed:
- Do not delete accounts that you are viewing in the detail page.
- Do delete new accounts that were created but not completely set up.

To Test on desktop saucy:

# branch this
cd branchname

mkdir build
cd build
cmake -DLIB_SUFFIX=/i386-linux-gnu -DCMAKE_INSTALL_PREFIX=/usr ..

make && sudo make install && U1_DEBUG=1 annotate-output system-settings

- click 'accounts', 'ubuntuone' to start creating a U1 account. don't enter any data.
- use 'back' button from toolbar
= note that no account is listed. (It was created then deleted)

# then,
- click 'ubuntuone', and create an account.
= note the account is listed.
- click on the account to view its details
- use 'back' button from toolbar
= note the account is still listed.

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) wrote :

looks good to me

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'online-accounts-provider/Main.qml'
2--- online-accounts-provider/Main.qml 2013-10-02 20:15:18 +0000
3+++ online-accounts-provider/Main.qml 2013-10-08 21:18:46 +0000
4@@ -41,7 +41,7 @@
5 sourceComponent: account.accountId != 0 ? existingAccountComponent : newAccountComponent
6
7 onLoaded: {
8- /* NOTE: dirty hack to work around out grandparent Page (from
9+ /* NOTE: dirty hack to work around our grandparent Page (from
10 AccountCreationPage.qml in
11 ubuntu-system-settings-online-accounts) not being able
12 to find our Flickable, and not having an id set for us
13@@ -55,8 +55,8 @@
14 Connections {
15 target: rootFlickable.parent.parent.tools.back;
16 onTriggered: {
17- console.debug("page back button clicked, deleting incomplete account.");
18- if(account.accountId != 0) {
19+ if(editPageLoader.source == newAccountUrl) {
20+ console.debug("back button clicked while creating account, removing incomplete account.");
21 account.remove(Account.RemoveCredentials);
22 editPageLoader.item.resetUI();
23 }
24
25=== modified file 'online-accounts-provider/NewAccount.qml'
26--- online-accounts-provider/NewAccount.qml 2013-10-04 18:02:59 +0000
27+++ online-accounts-provider/NewAccount.qml 2013-10-08 21:18:46 +0000
28@@ -24,7 +24,6 @@
29 Column {
30 id: main
31
32- property bool isNewAccount: false
33 property variant __account: account
34
35 state: "login" // or "register" or "twofactor"
36@@ -38,7 +37,6 @@
37 spacing: units.gu(2)
38
39 Component.onCompleted: {
40- isNewAccount = (__account.accountId === 0);
41 enableAccount();
42 __account.sync()
43 resetUI();

Subscribers

People subscribed via source and target branches

to all changes: