mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 17:59:51 +02:00
Squashed commit of the following:
commit c25dd3c13f39f9d69246ad83e5c5e8a140fc39b1 Author: Jonas L <jonas@determapp.de> Date: Mon Feb 25 00:00:00 2019 +0000 Fix crash with bottom navigation
This commit is contained in:
parent
6696e6f7b1
commit
86a2882128
3 changed files with 6 additions and 6 deletions
|
@ -75,13 +75,13 @@ class ManageCategoryFragment : Fragment(), FragmentWithCustomTitle {
|
|||
bottom_navigation_view.setOnNavigationItemSelectedListener {
|
||||
menuItem ->
|
||||
|
||||
pager.currentItem = when(menuItem.itemId) {
|
||||
pager?.currentItem = when(menuItem.itemId) {
|
||||
R.id.manage_category_tab_apps -> 0
|
||||
R.id.manage_category_tab_time_limit_rules -> 1
|
||||
R.id.manage_category_tab_blocked_time_areas -> 2
|
||||
R.id.manage_category_tab_usage_log -> 3
|
||||
R.id.manage_category_tab_settings -> 4
|
||||
else -> 0
|
||||
else -> throw IllegalStateException()
|
||||
}
|
||||
|
||||
true
|
||||
|
|
|
@ -79,11 +79,11 @@ class ManageChildFragment : Fragment(), FragmentWithCustomTitle {
|
|||
bottom_navigation_view.setOnNavigationItemSelectedListener {
|
||||
menuItem ->
|
||||
|
||||
pager.currentItem = when (menuItem.itemId) {
|
||||
pager?.currentItem = when (menuItem.itemId) {
|
||||
R.id.manage_child_tab_categories -> 0
|
||||
R.id.manage_child_tab_apps -> 1
|
||||
R.id.manage_child_tab_manage -> 2
|
||||
else -> 0
|
||||
else -> throw IllegalStateException()
|
||||
}
|
||||
|
||||
true
|
||||
|
|
|
@ -113,11 +113,11 @@ class MainFragment : Fragment(), OverviewFragmentParentHandlers, AboutFragmentPa
|
|||
bottom_navigation_view.setOnNavigationItemSelectedListener {
|
||||
menuItem ->
|
||||
|
||||
pager.currentItem = when(menuItem.itemId) {
|
||||
pager?.currentItem = when(menuItem.itemId) {
|
||||
R.id.main_tab_overview -> 0
|
||||
R.id.main_tab_uninstall -> 1
|
||||
R.id.main_tab_about -> 2
|
||||
else -> 0
|
||||
else -> throw IllegalStateException()
|
||||
}
|
||||
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue