Merge lp:~joergberroth/unav/fixFirstIcon into lp:unav

Proposed by JkB
Status: Merged
Merged at revision: 89
Proposed branch: lp:~joergberroth/unav/fixFirstIcon
Merge into: lp:unav
Diff against target: 42 lines (+10/-2)
1 file modified
qml/Location.qml (+10/-2)
To merge this branch: bzr merge lp:~joergberroth/unav/fixFirstIcon
Reviewer Review Type Date Requested Status
costales Approve
Review via email: mp+300237@code.launchpad.net

Commit message

*fix Location.qml first item in history view

Description of the change

*fix Location.qml: first item in history view

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

Awesome! Thanks a lot Joerg :D

review: Approve

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-07-15 15:49:25 +0000
3+++ qml/Location.qml 2016-07-15 19:13:40 +0000
4@@ -35,6 +35,10 @@
5 id: xmlSearchModel
6
7 onStatusChanged: {
8+ if (status === XmlListModel.Loading) {
9+ historyModel.clear();
10+ }
11+
12 if (status === XmlListModel.Error) {
13 historyModel.clear();
14 statusLabel.text = i18n.tr("Time out! Please try again");
15@@ -48,12 +52,16 @@
16 statusLabel.text = i18n.tr("Sorry, nothing found. Try another search")
17 statusLabel.visible = true;
18 historyIcon.visible = false;
19+ listView.model = historyModel
20+ listView.delegate = historyDelegateComponent
21 }
22
23 else if (status === XmlListModel.Ready && count >> 0) {
24 statusLabel.visible = false;
25 historyIcon.visible = false;
26 sortedSearchModel.sortXmlList();
27+ listView.model = sortedSearchModel
28+ listView.delegate = searchDelegateComponent
29 }
30 }
31
32@@ -194,8 +202,8 @@
33
34 clip: true
35 anchors { fill: parent; topMargin: units.gu(2) }
36- model: xmlSearchModel.status !== XmlListModel.Loading && sortedSearchModel.count === 0 ? historyModel : sortedSearchModel
37- delegate: xmlSearchModel.status !== XmlListModel.Loading && sortedSearchModel.count === 0 ? historyDelegateComponent : searchDelegateComponent
38+ model: historyModel
39+ delegate: historyDelegateComponent
40
41 section.property: "title"
42 section.criteria: ViewSection.FullString

Subscribers

People subscribed via source and target branches