leave a comment for Kunal's suggestion. Diff comments:
> > === modified file 'TimeLineBase.qml' > --- TimeLineBase.qml 2015-08-20 12:27:59 +0000 > +++ TimeLineBase.qml 2015-11-27 01:49:25 +0000 > @@ -221,28 +221,27 @@ > if (event.endDateTime - day == 0) > return; > > - if (event.endDateTime.getDate() - day.getDate() == 0 && > - event.startDateTime.getDate() - day.getDate() == 0) { > + if (event.endDateTime.isSameDay(day) && > + event.endDateTime.isSameDay(event.startDateTime)) { > hour = event.startDateTime.getHours(); > yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + > hour * hourHeight > - durationMin = (event.endDateTime.getHours() - > event.startDateTime.getHours()) * 60; > - durationMin += (event.endDateTime.getMinutes() - > event.startDateTime.getMinutes()); > + durationMin = (event.endDateTime - event.startDateTime) / > Date.msPerMin; > } > - if (event.endDateTime.getDate() - day.getDate() == 0 && > - event.startDateTime - day < 0) { > + if (!event.startDateTime.isSameDay(day) && > + event.endDateTime.isSameDay(day)) { > hour = 0; > yPos = 0; > durationMin = event.endDateTime.getHours() * 60; > durationMin += event.endDateTime.getMinutes(); > } > - if (event.startDateTime.getDate() - day.getDate() == 0 && > - event.endDateTime - day >= Date.msPerDay) { > + if (event.startDateTime.isSameDay(day) && > + !event.endDateTime.isSameDay(day)) { > hour = event.startDateTime.getHours(); > yPos = (( event.startDateTime.getMinutes() * hourHeight) / 60) + > hour * hourHeight > durationMin = (24 - event.startDateTime.getHours()) * 60; > } > - if (event.endDateTime - day >= Date.msPerDay && > - event.startDateTime- day <= 0) { > + if (!event.startDateTime.isSameDay(day) && @Kunal, Sorry for the late reply. Thanks for your comment. This MR is mainly about issues lp #1515722 and lp #1523594 If these two issues are fixed with this MR. It's better we can merge it. For UI, personally I prefer to keep current implementation(filling whole timeline) since we have it for a period of time. This is a minor issue.But anyway please have a check with UX team about it. We can create another bug for this if UX team think "event displays in whole day section" is a better user experience. But currently we're blocked by this *minor* issue. Thanks. How about your ideas? > + !event.endDateTime.isSameDay(day)) { > hour = 0; > yPos = 0; > durationMin = 24 * 60; -- https://code.launchpad.net/~gary-wzl77/ubuntu-calendar-app/fix_1515722/+merge/278759 Your team Ubuntu Calendar Developers is requested to review the proposed merge of lp:~gary-wzl77/ubuntu-calendar-app/fix_1515722 into lp:ubuntu-calendar-app. -- Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers More help : https://help.launchpad.net/ListHelp