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

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

130 + compArray = header.select_many("TimeLineHeaderComponent")
131 + timeline = None
132 +
133 + for tilelineComponent in compArray:
134 + if tilelineComponent.isCurrentItem:
135 + timeline = tilelineComponent
136 + break

Autopilot allows to do this in a much simpler way:

    timeline = header.select_single("TimeLineHeaderComponent", isCurrentItem=True)

The same applies to get_current_year() and to selected_month.

review: Needs Fixing

« Back to merge proposal