Merge lp:~mzanetti/reminders-app/fix-search into lp:reminders-app

Proposed by Michael Zanetti
Status: Merged
Approved by: Riccardo Padovani
Approved revision: no longer in the source branch.
Merged at revision: 362
Proposed branch: lp:~mzanetti/reminders-app/fix-search
Merge into: lp:reminders-app
Diff against target: 173 lines (+54/-14)
5 files modified
src/app/qml/reminders.qml (+14/-6)
src/app/qml/ui/NotebooksPage.qml (+2/-1)
src/app/qml/ui/RemindersPage.qml (+3/-1)
src/app/qml/ui/SearchNotesPage.qml (+33/-5)
src/app/qml/ui/TagsPage.qml (+2/-1)
To merge this branch: bzr merge lp:~mzanetti/reminders-app/fix-search
Reviewer Review Type Date Requested Status
Riccardo Padovani Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+251348@code.launchpad.net

Commit message

fix search

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: Approve (continuous-integration)
358. By Michael Zanetti

Properly reset the connection when it fails.

Seems just closing and reopening is not enough. We need to create a new socket.

Approved by Riccardo Padovani, Ubuntu Phone Apps Jenkins Bot.

359. By Michael Zanetti

Don't send the note content to the server if it hasn't changed.

This avoids long saving times for notes with big content/attachment when only changing it's reminder or tags.

Approved by Riccardo Padovani, Ubuntu Phone Apps Jenkins Bot.

360. By Launchpad Translations on behalf of reminders-app-dev

Launchpad automatic translations update.

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

lgtm

review: Approve
361. By Michael Zanetti

Improve section headers when sorting

Previously section headers were always built on dateCreated. Now they adjust depending on the selected sorting mechanism.

Approved by Riccardo Padovani, Ubuntu Phone Apps Jenkins Bot.

362. By Michael Zanetti

fix search.

Approved by Riccardo Padovani, Ubuntu Phone Apps Jenkins Bot.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/app/qml/reminders.qml'
--- src/app/qml/reminders.qml 2015-02-24 18:33:04 +0000
+++ src/app/qml/reminders.qml 2015-02-28 01:44:32 +0000
@@ -144,6 +144,13 @@
144 }144 }
145 }145 }
146146
147 function openSearch() {
148 var component = Qt.createComponent(Qt.resolvedUrl("ui/SearchNotesPage.qml"))
149 var page = component.createObject();
150 pagestack.push(page)
151 page.noteSelected.connect(function(note) {root.displayNote(note)})
152 }
153
147 function doLogin() {154 function doLogin() {
148 var accountName = preferences.accountName;155 var accountName = preferences.accountName;
149 if (accountName == "@local") {156 if (accountName == "@local") {
@@ -453,12 +460,7 @@
453 sideViewLoader.clear();460 sideViewLoader.clear();
454 }461 }
455 }462 }
456 onOpenSearch: {463 onOpenSearch: root.openSearch();
457 var component = Qt.createComponent(Qt.resolvedUrl("ui/SearchNotesPage.qml"))
458 var page = component.createObject();
459 pagestack.push(page)
460 page.noteSelected.connect(function(note) {root.displayNote(note)})
461 }
462 }464 }
463 }465 }
464466
@@ -490,6 +492,8 @@
490 })492 })
491 NotesStore.refreshNotes();493 NotesStore.refreshNotes();
492 }494 }
495
496 onOpenSearch: root.openSearch();
493 }497 }
494 }498 }
495499
@@ -505,6 +509,8 @@
505 sideViewLoader.clear();509 sideViewLoader.clear();
506 }510 }
507 }511 }
512
513 onOpenSearch: root.openSearch();
508 }514 }
509 }515 }
510516
@@ -532,6 +538,8 @@
532 })538 })
533 NotesStore.refreshNotes();539 NotesStore.refreshNotes();
534 }540 }
541
542 onOpenSearch: root.openSearch();
535 }543 }
536 }544 }
537 }545 }
538546
=== modified file 'src/app/qml/ui/NotebooksPage.qml'
--- src/app/qml/ui/NotebooksPage.qml 2014-12-14 22:31:00 +0000
+++ src/app/qml/ui/NotebooksPage.qml 2015-02-28 01:44:32 +0000
@@ -29,6 +29,7 @@
29 property bool narrowMode29 property bool narrowMode
3030
31 signal openNotebook(string notebookGuid)31 signal openNotebook(string notebookGuid)
32 signal openSearch();
3233
33 onActiveChanged: {34 onActiveChanged: {
34 if (active) {35 if (active) {
@@ -53,7 +54,7 @@
53 text: i18n.tr("Search")54 text: i18n.tr("Search")
54 iconName: "search"55 iconName: "search"
55 onTriggered: {56 onTriggered: {
56 pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))57 root.openSearch();
57 }58 }
58 }59 }
59 }60 }
6061
=== modified file 'src/app/qml/ui/RemindersPage.qml'
--- src/app/qml/ui/RemindersPage.qml 2015-02-13 00:10:26 +0000
+++ src/app/qml/ui/RemindersPage.qml 2015-02-28 01:44:32 +0000
@@ -28,13 +28,15 @@
2828
29 property var selectedNote: null29 property var selectedNote: null
3030
31 signal openSearch();
32
31 tools: ToolbarItems {33 tools: ToolbarItems {
32 ToolbarButton {34 ToolbarButton {
33 action: Action {35 action: Action {
34 text: i18n.tr("Search")36 text: i18n.tr("Search")
35 iconName: "search"37 iconName: "search"
36 onTriggered: {38 onTriggered: {
37 pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))39 root.openSearch();
38 }40 }
39 }41 }
40 }42 }
4143
=== modified file 'src/app/qml/ui/SearchNotesPage.qml'
--- src/app/qml/ui/SearchNotesPage.qml 2014-09-23 12:39:27 +0000
+++ src/app/qml/ui/SearchNotesPage.qml 2015-02-28 01:44:32 +0000
@@ -73,14 +73,42 @@
7373
74 delegate: NotesDelegate {74 delegate: NotesDelegate {
75 title: model.title75 title: model.title
76 creationDate: model.created76 date: model.created
77 content: model.plaintextContent77 content: model.tagline
7878 resource: model.resourceUrls.length > 0 ? model.resourceUrls[0] : ""
79 onClicked: {79 notebookColor: preferences.colorForNotebook(model.notebookGuid)
80 reminder: model.reminder
81 synced: model.synced
82 loading: model.loading
83 syncError: model.syncError
84 conflicting: model.conflicting
85
86 triggerActionOnMouseRelease: true
87 tags: {
88 var tags = new Array();
89 for (var i = 0; i < model.tagGuids.length; i++) {
90 tags.push(NotesStore.tag(model.tagGuids[i]).name)
91 }
92 return tags.join(" ");
93 }
94
95 onItemClicked: {
80 root.noteSelected(NotesStore.note(guid))96 root.noteSelected(NotesStore.note(guid))
81 }97 }
98 onDeleteNote: {
99 NotesStore.deleteNote(model.guid)
100 }
101 onEditNote: {
102 root.editNote(NotesStore.note(model.guid));
103 }
104 onEditReminder: {
105 pageStack.push(Qt.resolvedUrl("SetReminderPage.qml"), { note: NotesStore.note(model.guid) });
106 }
107 onEditTags: {
108 PopupUtils.open(Qt.resolvedUrl("../components/EditTagsDialog.qml"), root,
109 { note: NotesStore.note(model.guid), pageHeight: root.height });
110 }
82 }111 }
83 }112 }
84
85 }113 }
86}114}
87115
=== modified file 'src/app/qml/ui/TagsPage.qml'
--- src/app/qml/ui/TagsPage.qml 2014-12-14 22:31:00 +0000
+++ src/app/qml/ui/TagsPage.qml 2015-02-28 01:44:32 +0000
@@ -29,6 +29,7 @@
29 property bool narrowMode29 property bool narrowMode
3030
31 signal openTaggedNotes(string tagGuid)31 signal openTaggedNotes(string tagGuid)
32 signal openSearch();
3233
33 onActiveChanged: {34 onActiveChanged: {
34 if (active) {35 if (active) {
@@ -50,7 +51,7 @@
50 text: i18n.tr("Search")51 text: i18n.tr("Search")
51 iconName: "search"52 iconName: "search"
52 onTriggered: {53 onTriggered: {
53 pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))54 root.openSearch();
54 }55 }
55 }56 }
56 }57 }

Subscribers

People subscribed via source and target branches