Skip to content

Commit

Permalink
all: smoother main navigation icons (fixes #4891) (#4892)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Avinash-Codes and dogi authored Dec 19, 2024
1 parent 626dd23 commit e98d109
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 26
targetSdkVersion 34
versionCode 2143
versionName "0.21.43"
versionCode 2144
versionName "0.21.44"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
.addDrawerItems(*drawerItems).addStickyDrawerItems(*drawerItemsFooter)
.withOnDrawerItemClickListener { _: View?, _: Int, drawerItem: IDrawerItem<*, *>? ->
if (drawerItem != null) {
result?.setSelection(drawerItem.identifier, false) // Update selected state
menuAction((drawerItem as Nameable<*>).name.textRes)
}
false
Expand Down Expand Up @@ -849,6 +850,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
}

override fun onNavigationItemSelected(item: MenuItem): Boolean {
item.isChecked = true
when (item.itemId) {
R.id.menu_library -> {
openCallFragment(ResourcesFragment())
Expand Down Expand Up @@ -877,6 +879,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
openCallFragment(BellDashboardFragment())
}
}
item.isChecked = true
return true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
.addDrawerItems(*drawerItems).addStickyDrawerItems(*drawerItemsFooter)
.withOnDrawerItemClickListener { _: View?, _: Int, drawerItem: IDrawerItem<*, *>? ->
if (drawerItem != null) {
result?.setSelection(drawerItem.identifier, false) // Update selected state
menuAction((drawerItem as Nameable<*>).name.textRes)
}
false
Expand Down Expand Up @@ -849,6 +850,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
}

override fun onNavigationItemSelected(item: MenuItem): Boolean {
item.isChecked = true
when (item.itemId) {
R.id.menu_library -> {
openCallFragment(ResourcesFragment())
Expand Down Expand Up @@ -877,6 +879,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
openCallFragment(BellDashboardFragment())
}
}
item.isChecked = true
return true
}

Expand Down

0 comments on commit e98d109

Please sign in to comment.