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
1=== modified file 'src/app/qml/reminders.qml'
2--- src/app/qml/reminders.qml 2015-02-24 18:33:04 +0000
3+++ src/app/qml/reminders.qml 2015-02-28 01:44:32 +0000
4@@ -144,6 +144,13 @@
5 }
6 }
7
8+ function openSearch() {
9+ var component = Qt.createComponent(Qt.resolvedUrl("ui/SearchNotesPage.qml"))
10+ var page = component.createObject();
11+ pagestack.push(page)
12+ page.noteSelected.connect(function(note) {root.displayNote(note)})
13+ }
14+
15 function doLogin() {
16 var accountName = preferences.accountName;
17 if (accountName == "@local") {
18@@ -453,12 +460,7 @@
19 sideViewLoader.clear();
20 }
21 }
22- onOpenSearch: {
23- var component = Qt.createComponent(Qt.resolvedUrl("ui/SearchNotesPage.qml"))
24- var page = component.createObject();
25- pagestack.push(page)
26- page.noteSelected.connect(function(note) {root.displayNote(note)})
27- }
28+ onOpenSearch: root.openSearch();
29 }
30 }
31
32@@ -490,6 +492,8 @@
33 })
34 NotesStore.refreshNotes();
35 }
36+
37+ onOpenSearch: root.openSearch();
38 }
39 }
40
41@@ -505,6 +509,8 @@
42 sideViewLoader.clear();
43 }
44 }
45+
46+ onOpenSearch: root.openSearch();
47 }
48 }
49
50@@ -532,6 +538,8 @@
51 })
52 NotesStore.refreshNotes();
53 }
54+
55+ onOpenSearch: root.openSearch();
56 }
57 }
58 }
59
60=== modified file 'src/app/qml/ui/NotebooksPage.qml'
61--- src/app/qml/ui/NotebooksPage.qml 2014-12-14 22:31:00 +0000
62+++ src/app/qml/ui/NotebooksPage.qml 2015-02-28 01:44:32 +0000
63@@ -29,6 +29,7 @@
64 property bool narrowMode
65
66 signal openNotebook(string notebookGuid)
67+ signal openSearch();
68
69 onActiveChanged: {
70 if (active) {
71@@ -53,7 +54,7 @@
72 text: i18n.tr("Search")
73 iconName: "search"
74 onTriggered: {
75- pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))
76+ root.openSearch();
77 }
78 }
79 }
80
81=== modified file 'src/app/qml/ui/RemindersPage.qml'
82--- src/app/qml/ui/RemindersPage.qml 2015-02-13 00:10:26 +0000
83+++ src/app/qml/ui/RemindersPage.qml 2015-02-28 01:44:32 +0000
84@@ -28,13 +28,15 @@
85
86 property var selectedNote: null
87
88+ signal openSearch();
89+
90 tools: ToolbarItems {
91 ToolbarButton {
92 action: Action {
93 text: i18n.tr("Search")
94 iconName: "search"
95 onTriggered: {
96- pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))
97+ root.openSearch();
98 }
99 }
100 }
101
102=== modified file 'src/app/qml/ui/SearchNotesPage.qml'
103--- src/app/qml/ui/SearchNotesPage.qml 2014-09-23 12:39:27 +0000
104+++ src/app/qml/ui/SearchNotesPage.qml 2015-02-28 01:44:32 +0000
105@@ -73,14 +73,42 @@
106
107 delegate: NotesDelegate {
108 title: model.title
109- creationDate: model.created
110- content: model.plaintextContent
111-
112- onClicked: {
113+ date: model.created
114+ content: model.tagline
115+ resource: model.resourceUrls.length > 0 ? model.resourceUrls[0] : ""
116+ notebookColor: preferences.colorForNotebook(model.notebookGuid)
117+ reminder: model.reminder
118+ synced: model.synced
119+ loading: model.loading
120+ syncError: model.syncError
121+ conflicting: model.conflicting
122+
123+ triggerActionOnMouseRelease: true
124+ tags: {
125+ var tags = new Array();
126+ for (var i = 0; i < model.tagGuids.length; i++) {
127+ tags.push(NotesStore.tag(model.tagGuids[i]).name)
128+ }
129+ return tags.join(" ");
130+ }
131+
132+ onItemClicked: {
133 root.noteSelected(NotesStore.note(guid))
134 }
135+ onDeleteNote: {
136+ NotesStore.deleteNote(model.guid)
137+ }
138+ onEditNote: {
139+ root.editNote(NotesStore.note(model.guid));
140+ }
141+ onEditReminder: {
142+ pageStack.push(Qt.resolvedUrl("SetReminderPage.qml"), { note: NotesStore.note(model.guid) });
143+ }
144+ onEditTags: {
145+ PopupUtils.open(Qt.resolvedUrl("../components/EditTagsDialog.qml"), root,
146+ { note: NotesStore.note(model.guid), pageHeight: root.height });
147+ }
148 }
149 }
150-
151 }
152 }
153
154=== modified file 'src/app/qml/ui/TagsPage.qml'
155--- src/app/qml/ui/TagsPage.qml 2014-12-14 22:31:00 +0000
156+++ src/app/qml/ui/TagsPage.qml 2015-02-28 01:44:32 +0000
157@@ -29,6 +29,7 @@
158 property bool narrowMode
159
160 signal openTaggedNotes(string tagGuid)
161+ signal openSearch();
162
163 onActiveChanged: {
164 if (active) {
165@@ -50,7 +51,7 @@
166 text: i18n.tr("Search")
167 iconName: "search"
168 onTriggered: {
169- pagestack.push(Qt.resolvedUrl("SearchNotesPage.qml"))
170+ root.openSearch();
171 }
172 }
173 }

Subscribers

People subscribed via source and target branches