[Android] Fix video display setting initial state

Nicolas Pomepuy git at videolan.org
Tue Oct 8 16:24:55 CEST 2019


vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Tue Oct  8 14:45:05 2019 +0200| [d72475b3734dcf03f63b503f4f5cee24f9ef1b8f] | committer: Geoffrey Métais

Fix video display setting initial state

Fixes #1063

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

 vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
index 194af3eb8..92d389fd6 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
@@ -150,8 +150,8 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL
         menu.findItem(R.id.ml_menu_last_playlist).isVisible = true
         menu.findItem(R.id.ml_menu_video_group).isVisible = viewModel.group == null && viewModel.folder == null
         val displayInCards = Settings.getInstance(requireActivity()).getBoolean("video_display_in_cards", true)
-        menu.findItem(R.id.ml_menu_display_grid).isVisible = displayInCards
-        menu.findItem(R.id.ml_menu_display_list).isVisible = !displayInCards
+        menu.findItem(R.id.ml_menu_display_grid).isVisible = !displayInCards
+        menu.findItem(R.id.ml_menu_display_list).isVisible = displayInCards
     }
 
     override fun onOptionsItemSelected(item: MenuItem): Boolean {
@@ -208,7 +208,7 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL
         viewModel.changeGroupingType(type)
         setDataObservers()
         (activity as? AppCompatActivity)?.run {
-            supportActionBar?.title = getTitle()
+            supportActionBar?.title = title
             invalidateOptionsMenu()
         }
     }



More information about the Android mailing list