Merge lp:~renatofilho/ubuntu-calendar-app/fix-1570928 into lp:ubuntu-calendar-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Arthur Mello
Approved revision: 833
Merged at revision: 836
Proposed branch: lp:~renatofilho/ubuntu-calendar-app/fix-1570928
Merge into: lp:ubuntu-calendar-app
Diff against target: 69 lines (+12/-12)
3 files modified
EventListModel.qml (+6/-2)
MonthWithEventsComponent.qml (+3/-0)
TimeLineBaseComponent.qml (+3/-10)
To merge this branch: bzr merge lp:~renatofilho/ubuntu-calendar-app/fix-1570928
Reviewer Review Type Date Requested Status
Arthur Mello (community) Approve
Jenkins Bot continuous-integration Approve
Review via email: mp+293309@code.launchpad.net

Commit message

Disable auto-update during the sync.
Force model update after filter change if model autoUpdate is set to false.

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
833. By Renato Araujo Oliveira Filho

Trunk merged.

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Arthur Mello (artmello) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'EventListModel.qml'
2--- EventListModel.qml 2016-04-26 20:04:33 +0000
3+++ EventListModel.qml 2016-05-02 14:52:58 +0000
4@@ -26,6 +26,12 @@
5
6 property var listeners:[];
7 property bool isLoading: false
8+ // disable update while syncing to avoid tons of unecessary update
9+ property var _priv: Binding {
10+ target: eventModel
11+ property: "autoUpdate"
12+ value: !mainView.syncInProgress
13+ }
14
15 function addModelChangeListener(listener){
16 listeners.push(listener);
17@@ -173,8 +179,6 @@
18 }
19 }
20
21- // disable update while syncing to avoid tons of unecessary update
22- autoUpdate: !mainView.syncInProgress
23 onAutoUpdateChanged: {
24 if (autoUpdate) {
25 eventModel.update()
26
27=== modified file 'MonthWithEventsComponent.qml'
28--- MonthWithEventsComponent.qml 2016-04-26 19:38:03 +0000
29+++ MonthWithEventsComponent.qml 2016-05-02 14:52:58 +0000
30@@ -48,6 +48,9 @@
31 repeat: false
32 onTriggered: {
33 mainModel.filter = Qt.binding(function() { return root.modelFilter } )
34+ if (!mainModel.autoUpdate) {
35+ mainModel.update()
36+ }
37 }
38 }
39
40
41=== modified file 'TimeLineBaseComponent.qml'
42--- TimeLineBaseComponent.qml 2016-03-29 13:19:06 +0000
43+++ TimeLineBaseComponent.qml 2016-05-02 14:52:58 +0000
44@@ -178,6 +178,9 @@
45 repeat: false
46 onTriggered: {
47 mainModel.filter = Qt.binding(function() { return root.modelFilter} )
48+ if (!mainModel.autoUpdate) {
49+ mainModel.update()
50+ }
51 }
52 }
53
54@@ -198,16 +201,6 @@
55 onEndPeriodChanged: idleRefresh.reset()
56 }
57
58- ActivityIndicator {
59- id: activityLoader
60- objectName : "activityIndicator"
61-
62- visible: running
63- anchors.centerIn: parent
64- //running: mainModel.isLoading
65- z:2
66- }
67-
68 Column {
69 anchors.fill: parent
70

Subscribers

People subscribed via source and target branches

to status/vote changes: