D17467: digital-clock: Show events on expanding applet
mbehrendt updated this revision to Diff 47409. mbehrendt added a comment. remove local variable "currentDate" and use "getDate" instead of "getDay" REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D17467?vs=47407&id=47409 REVISION DETAIL https://phabricator.kde.org/D17467 AFFECTED FILES applets/digital-clock/package/contents/ui/CalendarView.qml To: mbehrendt, #plasma, plasma-devel Cc: mart, broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
D17467: digital-clock: Show events on expanding applet
mbehrendt updated this revision to Diff 47407. mbehrendt added a comment. Total overhaul of the patch. I think I found the root cause for the events not being displayed. I also inserted some if clauses to reduce calculations. I also removed setting holidaysList.model = null as I could not reproduce the issue that was mentioned in the comment. REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D17467?vs=47317&id=47407 REVISION DETAIL https://phabricator.kde.org/D17467 AFFECTED FILES applets/digital-clock/package/contents/ui/CalendarView.qml To: mbehrendt, #plasma, plasma-devel Cc: mart, broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
D17467: digital-clock: Show events on expanding applet
mart added inline comments. INLINE COMMENTS > CalendarView.qml:60 > +// would always be empty. > +holidaysList.model = > monthView.daysModel.eventsForDate(monthView.currentDate); > +hasExpanded = true; instead of storing a local hasExpanded, could you just check for holidaysList.model not being null? REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D17467 To: mbehrendt, #plasma, plasma-devel Cc: mart, broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
D17467: digital-clock: Show events on expanding applet
mbehrendt updated this revision to Diff 47317. mbehrendt added a comment. more simplifications REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D17467?vs=47256&id=47317 REVISION DETAIL https://phabricator.kde.org/D17467 AFFECTED FILES applets/digital-clock/package/contents/ui/CalendarView.qml To: mbehrendt, #plasma Cc: broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D17467: digital-clock: Show events on expanding applet
mbehrendt added a reviewer: Plasma. mbehrendt added a comment. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D17467 To: mbehrendt, #plasma Cc: broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D17467: digital-clock: Show events on expanding applet
mbehrendt updated this revision to Diff 47256. mbehrendt marked an inline comment as done. mbehrendt added a comment. fix typos REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D17467?vs=47255&id=47256 REVISION DETAIL https://phabricator.kde.org/D17467 AFFECTED FILES applets/digital-clock/package/contents/ui/CalendarView.qml To: mbehrendt Cc: broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D17467: digital-clock: Show events on expanding applet
mbehrendt updated this revision to Diff 47255. mbehrendt added a comment. only once set hasExpanded = true REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D17467?vs=47252&id=47255 REVISION DETAIL https://phabricator.kde.org/D17467 AFFECTED FILES applets/digital-clock/package/contents/ui/CalendarView.qml To: mbehrendt Cc: broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D17467: digital-clock: Show events on expanding applet
mbehrendt updated this revision to Diff 47252. mbehrendt added a comment. This should even be lighter REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D17467?vs=47248&id=47252 REVISION DETAIL https://phabricator.kde.org/D17467 AFFECTED FILES applets/digital-clock/package/contents/ui/CalendarView.qml To: mbehrendt Cc: broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D17467: digital-clock: Show events on expanding applet
mbehrendt updated this revision to Diff 47248. mbehrendt added a comment. Besides checking for isExpanded this prevents from updating the holidaysList twice by checking if the date needs to be reset. REPOSITORY R120 Plasma Workspace CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D17467?vs=47241&id=47248 REVISION DETAIL https://phabricator.kde.org/D17467 AFFECTED FILES applets/digital-clock/package/contents/ui/CalendarView.qml To: mbehrendt Cc: broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D17467: digital-clock: Show events on expanding applet
broulik added inline comments. INLINE COMMENTS > CalendarView.qml:55 > monthView.resetToToday(); > +holidaysList.update(); > } I think this should check for `isExpanded` so it does not update the events (potentially heavy operation) when *closing* REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D17467 To: mbehrendt Cc: broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
D17467: digital-clock: Show events on expanding applet
mbehrendt created this revision. Herald added a project: Plasma. Herald added a subscriber: plasma-devel. mbehrendt requested review of this revision. REVISION SUMMARY When expanding the digital-clock applet the holidayList is not updated, so that events for the current day are not shown. In order to show the events for the current day after expansion one had to click on another day in the month view and then click back to the current day. This patch fixes that by properly updating the holidaysList's model. It also reduces redundancy by putting the update routine in a separate function. REPOSITORY R120 Plasma Workspace REVISION DETAIL https://phabricator.kde.org/D17467 AFFECTED FILES applets/digital-clock/package/contents/ui/CalendarView.qml To: mbehrendt Cc: plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart