[Android] Fix broken navigation to header

Nicolas Pomepuy git at videolan.org
Thu Apr 11 18:38:11 CEST 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Thu Apr 11 15:13:04 2019 +0200| [e91076f336627e09447d448246a3074d85b7d6d6] | committer: Geoffrey Métais

Fix broken navigation to header

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

 .../src/org/videolan/vlc/gui/tv/browser/AudioBrowserTvFragment.kt       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/browser/AudioBrowserTvFragment.kt b/vlc-android/src/org/videolan/vlc/gui/tv/browser/AudioBrowserTvFragment.kt
index 397bb33c1..d0ff5586e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/browser/AudioBrowserTvFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/browser/AudioBrowserTvFragment.kt
@@ -448,10 +448,10 @@ class AudioBrowserTvFragment : Fragment(), BrowserFragmentInterface, IEventsHand
         val positionForSectionByName = viewModel.getPositionForSectionByName(header)
         if (list.getChildAt(positionForSectionByName) == null) {
             adapter.focusNext = positionForSectionByName
-            list.scrollToPosition(positionForSectionByName)
         } else {
             list.getChildAt(positionForSectionByName).requestFocus()
         }
+        list.scrollToPosition(positionForSectionByName)
     }
 
     private fun hideHeaderSelectionScreen() {



More information about the Android mailing list