Code review comment for lp:~pkunal-parmar/ubuntu-calendar-app/yearview_fix

Revision history for this message
Olivier Tilloy (osomon) wrote :

52 + property bool shouldCreateHighlight: date.isSameDay(DateExt.today()) && isCurrentMonth
53 + property var hightlightObj;
54 +
55 + onShouldCreateHighlightChanged: {
56 + if( shouldCreateHighlight ) {
57 + hightlightObj = highLightComp.createObject(dateRootItem);
58 + hightlightObj.z = hightlightObj.z -1;
59 + } else {
60 + if( hightlightObj) {
61 + hightlightObj.destroy();
62 + }
63 + }

Please use a Loader element instead of manually instantiating/destroying objects.

review: Needs Fixing

« Back to merge proposal