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

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

> > 481 + tabs.selectedTabIndex = 1
> >
> > This looks useless as well.
>
> I using selectedTabIndex to change tab to MonthView, when some one click on
> year view. do you mean I need to do something else ?

Sorry, you’re right, I don’t know what I was thinking when I wrote that. That said, there’s a cleaner way to write this, that will ensure it remains correct even if tabs get reordered in the future:

    tabs.selectedTabIndex = monthTab.index

(and the same applies to other assignments of tabs.selectedTabIndex)

« Back to merge proposal