ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #09390
[Merge] lp:~renatofilho/ubuntu-calendar-app/fix-1570928 into lp:ubuntu-calendar-app
Renato Araujo Oliveira Filho has proposed merging lp:~renatofilho/ubuntu-calendar-app/fix-1570928 into lp:ubuntu-calendar-app.
Commit message:
Disable auto-update durning the sync.
Force model update after filter change if model autoUpdate is set to false.
Requested reviews:
Ubuntu Calendar Developers (ubuntu-calendar-dev)
For more details, see:
https://code.launchpad.net/~renatofilho/ubuntu-calendar-app/fix-1570928/+merge/293309
--
Your team Ubuntu Calendar Developers is requested to review the proposed merge of lp:~renatofilho/ubuntu-calendar-app/fix-1570928 into lp:ubuntu-calendar-app.
=== modified file 'EventListModel.qml'
--- EventListModel.qml 2016-04-26 20:04:33 +0000
+++ EventListModel.qml 2016-04-28 17:55:06 +0000
@@ -26,6 +26,12 @@
property var listeners:[];
property bool isLoading: false
+ // disable update while syncing to avoid tons of unecessary update
+ property var _priv: Binding {
+ target: eventModel
+ property: "autoUpdate"
+ value: !mainView.syncInProgress
+ }
function addModelChangeListener(listener){
listeners.push(listener);
@@ -173,9 +179,8 @@
}
}
- // disable update while syncing to avoid tons of unecessary update
- autoUpdate: !mainView.syncInProgress
onAutoUpdateChanged: {
+ console.debug("auto update changed:" + autoUpdate)
if (autoUpdate) {
eventModel.update()
}
=== modified file 'MonthWithEventsComponent.qml'
--- MonthWithEventsComponent.qml 2016-04-26 19:38:03 +0000
+++ MonthWithEventsComponent.qml 2016-04-28 17:55:06 +0000
@@ -48,6 +48,9 @@
repeat: false
onTriggered: {
mainModel.filter = Qt.binding(function() { return root.modelFilter } )
+ if (!mainModel.autoUpdate) {
+ mainModel.update()
+ }
}
}
=== modified file 'TimeLineBaseComponent.qml'
--- TimeLineBaseComponent.qml 2016-03-29 13:19:06 +0000
+++ TimeLineBaseComponent.qml 2016-04-28 17:55:06 +0000
@@ -178,6 +178,10 @@
repeat: false
onTriggered: {
mainModel.filter = Qt.binding(function() { return root.modelFilter} )
+ if (!mainModel.autoUpdate) {
+ console.debug("Force a update")
+ mainModel.update()
+ }
}
}
@@ -198,16 +202,6 @@
onEndPeriodChanged: idleRefresh.reset()
}
- ActivityIndicator {
- id: activityLoader
- objectName : "activityIndicator"
-
- visible: running
- anchors.centerIn: parent
- //running: mainModel.isLoading
- z:2
- }
-
Column {
anchors.fill: parent
References