ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #09359
Re: [Merge] lp:~renatofilho/ubuntu-calendar-app/fix-1573341 into lp:ubuntu-calendar-app
Diff comments:
> === modified file 'EventListModel.qml'
> --- EventListModel.qml 2016-03-15 13:58:25 +0000
> +++ EventListModel.qml 2016-04-26 19:42:50 +0000
> @@ -132,6 +134,35 @@
> }
> }
>
> + // Retruns a map with the date in string format as key, and true if there is events on the day or false as value.
> + function daysWithEvents()
> + {
> + // initialize array
> + var startDate = startPeriod.midnight()
> + var endDate = endPeriod.midnight()
> + var result = []
> + while(startDate <= endDate) {
> + result[startDate.toDateString()] = false
> + startDate = startDate.addDays(1)
> + }
> +
> + // set true for days with events
> + for(var index=0; index < items.length; index++) {
> + var ev = items[index]
> + var start = ev.startDateTime.midnight()
> + // if the event eds at 00:00:00 we reduce one minute to make sure that does not appear on this day
Shouldn't be "if the event ends..."?
> + var end = ev.endDateTime ? ev.endDateTime.addMinutes(-1).midnight() : start
> +
> + // set true for all days that this event exists, in case of multiple days events
> + while(start <= end) {
> + result[start.toDateString()] = true
> + start = start.addDays(1)
> + }
> + }
> +
> + return result
> + }
> +
> onStartPeriodChanged: {
> isLoading = true
> }
--
https://code.launchpad.net/~renatofilho/ubuntu-calendar-app/fix-1573341/+merge/292858
Your team Ubuntu Calendar Developers is requested to review the proposed merge of lp:~renatofilho/ubuntu-calendar-app/fix-1573341 into lp:ubuntu-calendar-app.
References