Merge lp:~costales/unav/0.60-nik-conv2-search-label-overwrite into lp:unav

Proposed by costales
Status: Merged
Merged at revision: 71
Proposed branch: lp:~costales/unav/0.60-nik-conv2-search-label-overwrite
Merge into: lp:unav
Prerequisite: lp:~nik90/unav/unav-convergence-part-2
Diff against target: 43 lines (+7/-6)
1 file modified
qml/Location.qml (+7/-6)
To merge this branch: bzr merge lp:~costales/unav/0.60-nik-conv2-search-label-overwrite
Reviewer Review Type Date Requested Status
uNav developers Pending
Review via email: mp+294723@code.launchpad.net

Description of the change

Don't overwrite the history results in Search page

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'qml/Location.qml'
2--- qml/Location.qml 2016-05-15 08:59:16 +0000
3+++ qml/Location.qml 2016-05-15 08:59:16 +0000
4@@ -36,15 +36,16 @@
5
6 onStatusChanged: {
7 if (status === XmlListModel.Error) {
8+ historyModel.clear();
9 statusLabel.text = i18n.tr("Time out! Please try again");
10 statusLabel.visible = true;
11 historyIcon.visible = false;
12 }
13
14 else if (status === XmlListModel.Ready && count === 0) {
15- //TRANSLATORS: This string is search shown when no POIs are found with the chosen search radius. %1 is the POI type eg..Pub, Airport
16- // Example string, "Sorry, no Airport found nearby. Try again with a larger search radius"
17- statusLabel.text = i18n.tr("Sorry, no %1 found nearby. Try again with a larger search radius").arg(searchField.text)
18+ historyModel.clear();
19+ //TRANSLATORS: This string is search shown when no POIs are found with the chosen search radius.
20+ statusLabel.text = i18n.tr("Sorry, nothing found. Try another search")
21 statusLabel.visible = true;
22 historyIcon.visible = false;
23 }
24@@ -215,7 +216,7 @@
25
26 onTriggered: {
27 if (text.trim()) {
28- statusLabel.visible = true
29+ statusLabel.visible = true;
30 statusLabel.text = i18n.tr("Searching…");
31 xmlSearchModel.searchString = text;
32 xmlSearchModel.search();
33@@ -226,8 +227,8 @@
34
35 onTextChanged: {
36 if (!text.trim()) {
37- xmlSearchModel.clear()
38- sortedSearchModel.clear()
39+ xmlSearchModel.clear();
40+ sortedSearchModel.clear();
41 }
42 }
43 }

Subscribers

People subscribed via source and target branches