Skip to content

Commit

Permalink
all: smoother notification navigation (fixes #4883) (#4905)
Browse files Browse the repository at this point in the history
Co-authored-by: Gideon Okuro <[email protected]>
Co-authored-by: dogi <[email protected]>
  • Loading branch information
3 people authored Dec 20, 2024
1 parent a0edd52 commit 1077bb9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 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 2149
versionName "0.21.49"
versionCode 2150
versionName "0.21.50"
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 @@ -740,7 +740,6 @@ 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 @@ -823,7 +822,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
ResourcesCompat.getDrawable(resources, R.drawable.mycourses, null)?.let { menuImageList.add(it) }
ResourcesCompat.getDrawable(resources, R.drawable.team, null)?.let { menuImageList.add(it) }
ResourcesCompat.getDrawable(resources, R.drawable.business, null)?.let { menuImageList.add(it) }
ResourcesCompat.getDrawable(resources, R.drawable.community, null)?.let { menuImageList.add(it) }
ResourcesCompat.getDrawable(resources, R.drawable.survey, null)?.let { menuImageList.add(it) }
ResourcesCompat.getDrawable(resources, R.drawable.survey, null)?.let { menuImageList.add(it) }
return arrayOf(
changeUX(R.string.menu_myplanet, menuImageList[0]).withIdentifier(0),
Expand Down Expand Up @@ -856,7 +855,6 @@ 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 @@ -885,7 +883,6 @@ 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 @@ -740,7 +740,6 @@ 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 @@ -823,7 +822,7 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
ResourcesCompat.getDrawable(resources, R.drawable.mycourses, null)?.let { menuImageList.add(it) }
ResourcesCompat.getDrawable(resources, R.drawable.team, null)?.let { menuImageList.add(it) }
ResourcesCompat.getDrawable(resources, R.drawable.business, null)?.let { menuImageList.add(it) }
ResourcesCompat.getDrawable(resources, R.drawable.community, null)?.let { menuImageList.add(it) }
ResourcesCompat.getDrawable(resources, R.drawable.survey, null)?.let { menuImageList.add(it) }
ResourcesCompat.getDrawable(resources, R.drawable.survey, null)?.let { menuImageList.add(it) }
return arrayOf(
changeUX(R.string.menu_myplanet, menuImageList[0]).withIdentifier(0),
Expand Down Expand Up @@ -856,7 +855,6 @@ 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 @@ -885,7 +883,6 @@ class DashboardActivity : DashboardElementActivity(), OnHomeItemClickListener, N
openCallFragment(BellDashboardFragment())
}
}
item.isChecked = true
return true
}

Expand Down

0 comments on commit 1077bb9

Please sign in to comment.