implement the actual Go to today button functionality

This commit is contained in:
tibbi 2017-02-19 20:51:25 +01:00
parent ba7e25bb65
commit ca01192f22
1 changed files with 7 additions and 1 deletions

View File

@ -139,7 +139,13 @@ class MainActivity : SimpleActivity(), NavigationListener {
} }
private fun goToToday() { private fun goToToday() {
if (config.storedView == WEEKLY_VIEW) {
week_view_view_pager.currentItem = mDefaultWeeklyPage
} else if (config.storedView == MONTHLY_VIEW) {
main_view_pager.currentItem = mDefaultMonthlyPage
} else if (config.storedView == YEARLY_VIEW) {
main_view_pager.currentItem = mDefaultYearlyPage
}
} }
private fun shouldGoToTodayBeVisible(): Boolean { private fun shouldGoToTodayBeVisible(): Boolean {