Merge lp:~ahayzen/music-app/fix-1470755-playlist-0-append into lp:music-app

Proposed by Andrew Hayzen on 2015-07-02
Status: Merged
Approved by: Victor Thompson on 2015-07-08
Approved revision: 880
Merged at revision: 883
Proposed branch: lp:~ahayzen/music-app/fix-1470755-playlist-0-append
Merge into: lp:music-app
Diff against target: 39 lines (+6/-8)
2 files modified
app/components/ColumnFlow.qml (+5/-1)
app/components/Flickables/CardView.qml (+1/-7)
To merge this branch: bzr merge lp:~ahayzen/music-app/fix-1470755-playlist-0-append
Reviewer Review Type Date Requested Status
Victor Thompson 2015-07-02 Approve on 2015-07-08
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve on 2015-07-08
Review via email: mp+263707@code.launchpad.net

Commit Message

* Ensure that the lowest rebuild index is retained
* Use an alias to set the model as the CardView knows about preloading now

Description of the Change

* Ensure that the lowest rebuild index is retained
* Use an alias to set the model as the CardView knows about preloading now

To post a comment you must log in.

PASSED: Continuous integration, rev:879
http://91.189.93.70:8080/job/music-app-ci/1334/
Executed test runs:
    SUCCESS: http://91.189.93.70:8080/job/music-app-vivid-amd64-ci/186

Click here to trigger a rebuild:
http://91.189.93.70:8080/job/music-app-ci/1334/rebuild

review: Approve (continuous-integration)
Victor Thompson (vthompson) wrote :

I have one nitpicky comment on commentary.

review: Needs Fixing
Victor Thompson (vthompson) wrote :

Maybe reword to: Only update the delay index if it isn't set (-1) or if it is within the size of the model (lastIndex) and is lower than the current delayed index.

880. By Andrew Hayzen on 2015-07-08

* Remove empty code comment line

PASSED: Continuous integration, rev:880
http://91.189.93.70:8080/job/music-app-ci/1337/
Executed test runs:
    SUCCESS: http://91.189.93.70:8080/job/music-app-vivid-amd64-ci/189

Click here to trigger a rebuild:
http://91.189.93.70:8080/job/music-app-ci/1337/rebuild

review: Approve (continuous-integration)
Victor Thompson (vthompson) wrote :

lgtm :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/components/ColumnFlow.qml'
2--- app/components/ColumnFlow.qml 2015-06-07 12:35:42 +0000
3+++ app/components/ColumnFlow.qml 2015-07-08 00:33:07 +0000
4@@ -492,7 +492,11 @@
5
6 function setDelayRebuildIndex(index)
7 {
8- if (delayRebuildIndex === -1 || index < lastIndex) {
9+ // Only update the delay index if it isn't set (-1) or
10+ // if it is within the size of the model (lastIndex)
11+ // and is lower than the current delayed index
12+ if (delayRebuildIndex === -1 ||
13+ (index < delayRebuildIndex && index < lastIndex)) {
14 delayRebuildIndex = index
15 }
16 }
17
18=== modified file 'app/components/Flickables/CardView.qml'
19--- app/components/Flickables/CardView.qml 2015-05-03 16:22:31 +0000
20+++ app/components/Flickables/CardView.qml 2015-07-08 00:33:07 +0000
21@@ -35,17 +35,11 @@
22 property alias delegate: flow.delegate
23 property var getter
24 property alias header: headerLoader.sourceComponent
25- property var model: flow.model
26+ property alias model: flow.model
27 property real itemWidth: units.gu(15)
28
29 onGetterChanged: flow.getter = getter // cannot use alias to set a function (must be var)
30
31- onVisibleChanged: {
32- if (visible) { // only load model once CardView is visible
33- flow.model = model
34- }
35- }
36-
37 Loader {
38 id: headerLoader
39 visible: sourceComponent !== undefined

Subscribers

People subscribed via source and target branches