← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

Re: [Merge] lp:~pkunal-parmar/ubuntu-calendar-app/DefCalendar into lp:ubuntu-calendar-app

 

Review: Needs Fixing

it works fine , but there is a small change, it seems we are not using declared variable , we should remove that if we are not using it.

Diff comments:

> === modified file 'EventListModel.qml'
> --- EventListModel.qml	2015-05-14 13:03:02 +0000
> +++ EventListModel.qml	2015-07-16 13:51:18 +0000
> @@ -77,6 +77,31 @@
>          return cals;
>  	}
>  
> +    function getDefaultCollection() {
> +        var userDefCalFound = false;

It seems, we are not using this variable , we could remove this.

> +        var cals = getCollections();
> +         for(var i = 0 ; i < cals.length ; ++i) {
> +            var cal = cals[i]
> +            var val = cal.extendedMetaData("X-CAL-DEFAULT-CALENDAR")
> +            if( val ) {
> +                return cal;
> +            }
> +        }
> +
> +        return defaultCollection();
> +    }
> +
> +    function setDefaultCollection( collectionId ) {
> +        var cals = getCollections();
> +         for(var i = 0 ; i < cals.length ; ++i) {
> +             var cal = cals[i]
> +             cal.setExtendedMetaData("X-CAL-DEFAULT-CALENDAR", false);
> +             if( cal.collectionId === collectionId) {
> +                cal.setExtendedMetaData("X-CAL-DEFAULT-CALENDAR", true);
> +             }
> +        }
> +    }
> +
>      onStartPeriodChanged: {
>          isLoading = true
>      }


-- 
https://code.launchpad.net/~pkunal-parmar/ubuntu-calendar-app/DefCalendar/+merge/264990
Your team Ubuntu Calendar Developers is subscribed to branch lp:ubuntu-calendar-app.


References