[Android] Fix bottom navigation item not selected when coming from home shortcuts

Nicolas Pomepuy git at videolan.org
Thu May 7 12:17:14 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu May  7 08:34:49 2020 +0200| [9ec463de9892c0de92931a01944ae5ee5b909ae8] | committer: Nicolas Pomepuy

Fix bottom navigation item not selected when coming from home shortcuts

Fixes #1324

> https://code.videolan.org/videolan/vlc-android/commit/9ec463de9892c0de92931a01944ae5ee5b909ae8
---

 application/vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt b/application/vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt
index 18d1ed8c3..824e04839 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/helpers/Navigator.kt
@@ -253,7 +253,7 @@ class Navigator : BottomNavigationView.OnNavigationItemSelectedListener, Lifecyc
             else -> {
                 val currentId = currentFragmentId
                 val target = navigationView.menu.findItem(id)
-                if (id != currentId && target != null) {
+                if (id != navigationView.selectedItemId && target != null) {
                     val current = navigationView.menu.findItem(currentId)
                     if (current != null) current.isChecked = false
                     target.isChecked = true



More information about the Android mailing list