Skip to content

Commit

Permalink
drawericon: smoother icon(fixes #4891)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avinash-Codes committed Dec 18, 2024
1 parent d23d288 commit aa7cfee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
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 aa7cfee

Please sign in to comment.