Merge lp:~renatofilho/ubuntu-calendar-app/avoid-load-all-events into lp:ubuntu-calendar-app

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Kunal Parmar
Approved revision: 207
Merged at revision: 207
Proposed branch: lp:~renatofilho/ubuntu-calendar-app/avoid-load-all-events
Merge into: lp:ubuntu-calendar-app
Diff against target: 24 lines (+4/-0)
2 files modified
EventListModel.qml (+1/-0)
calendar.qml (+3/-0)
To merge this branch: bzr merge lp:~renatofilho/ubuntu-calendar-app/avoid-load-all-events
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Kunal Parmar Approve
Review via email: mp+208372@code.launchpad.net

Commit message

Disabled calendar model autoUpdate until a date interval is set.

We need to disable the autoUpdate to avoid the model to load all events without a limit of dates. This is necessary because the model is created without the interval and this is set late on the code.

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

Changes looks fine to me,

May be we can use binding with autoupdate,

something like,
autoUpdate: startPeriod && endPeriod

anyway, I will approve once I test it.

Revision history for this message
Kunal Parmar (pkunal-parmar) wrote :

Works fine.

review: Approve
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

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 2013-10-17 12:52:23 +0000
3+++ EventListModel.qml 2014-02-26 13:43:45 +0000
4@@ -6,6 +6,7 @@
5 OrganizerModel {
6 id: eventModel
7 manager:"eds"
8+ autoUpdate: false
9
10 signal reloaded
11
12
13=== modified file 'calendar.qml'
14--- calendar.qml 2014-01-09 23:15:57 +0000
15+++ calendar.qml 2014-02-26 13:43:45 +0000
16@@ -92,6 +92,9 @@
17 if(globalModel) {
18 globalModel.startPeriod = new Date(currentDay.getFullYear(),0,1,0,0,0,0);
19 globalModel.endPeriod = new Date(currentDay.getFullYear(),11,31,0,0,0,0);
20+ // only enable auto update after set the date interval
21+ globalModel.autoUpdate = true
22+ globalModel.update()
23 }
24 }
25

Subscribers

People subscribed via source and target branches

to status/vote changes: