Merge lp:~rpadovani/reminders-app/defaultNotebookLocalStorage into lp:reminders-app

Proposed by Riccardo Padovani
Status: Merged
Approved by: Michael Zanetti
Approved revision: 346
Merged at revision: 349
Proposed branch: lp:~rpadovani/reminders-app/defaultNotebookLocalStorage
Merge into: lp:reminders-app
Diff against target: 12 lines (+2/-1)
1 file modified
src/app/qml/reminders.qml (+2/-1)
To merge this branch: bzr merge lp:~rpadovani/reminders-app/defaultNotebookLocalStorage
Reviewer Review Type Date Requested Status
Michael Zanetti (community) Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+250180@code.launchpad.net

Commit message

Add a default notebook to local account

Description of the change

While the solution could be implemented in other ways (like counting number of notebooks) having a way to know if it's the first time user uses local account could be useful in future, e.g. we can add a tutorial.

Anyway, if you find this overkill, I'll study another solution.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

I don't think we need a second setting for that, instead we can piggypack on the haveLocalUser one. In line 340, haveLocalUser is set to true. We can just add a check before that, like:

if (!haveLocalUser) {
    NotesStore.createNotebook(...)
    haveLocalUser = true;
}

Also, I don't really like the "First Notebook" one. Please use "Default Notebook" or similar.

review: Needs Fixing
343. By Riccardo Padovani

reverted unwanted changes

344. By Riccardo Padovani

Added default notebook to local user

345. By Riccardo Padovani

Fixed diverged branches

346. By Riccardo Padovani

reverted unwanted changes

Revision history for this message
Riccardo Padovani (rpadovani) wrote :

You're right, fixed, thanks :-)

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Zanetti (mzanetti) wrote :

yip yip

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/app/qml/reminders.qml'
2--- src/app/qml/reminders.qml 2015-02-20 17:16:46 +0000
3+++ src/app/qml/reminders.qml 2015-02-23 18:00:58 +0000
4@@ -338,7 +338,8 @@
5 EvernoteConnection.token = "";
6 NotesStore.username = username;
7 preferences.accountName = username;
8- if (username === "@local") {
9+ if (username === "@local" && !preferences.haveLocalUser) {
10+ NotesStore.createNotebook(i18n.tr("Default notebook"));
11 preferences.haveLocalUser = true;
12 }
13

Subscribers

People subscribed via source and target branches