[Android] Videos: use proper menu update function
Geoffrey Métais
git at videolan.org
Tue Oct 1 14:33:44 CEST 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Sep 26 15:48:44 2019 +0200| [513de0b312f6d81fc6869801aedffcd1af44a9e7] | committer: Geoffrey Métais
Videos: use proper menu update function
> https://code.videolan.org/videolan/vlc-android/commit/513de0b312f6d81fc6869801aedffcd1af44a9e7
---
vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt | 2 +-
.../src/org/videolan/vlc/viewmodels/mobile/AlbumSongsViewModel.kt | 2 +-
2 files changed, 2 insertions(+), 2 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 5e33986c1..27e89eaf2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.kt
@@ -365,7 +365,7 @@ class VideoGridFragment : MediaBrowserFragment<VideosViewModel>(), SwipeRefreshL
if (!mediaLibrary.isWorking) handler.sendEmptyMessage(UNSET_REFRESHING)
updateEmptyView()
setFabPlayVisibility(true)
- UiTools.updateSortTitles(this at VideoGridFragment)
+ menu?.let { UiTools.updateSortTitles(it, viewModel.provider) }
}
restoreMultiSelectHelper()
}
diff --git a/vlc-android/src/org/videolan/vlc/viewmodels/mobile/AlbumSongsViewModel.kt b/vlc-android/src/org/videolan/vlc/viewmodels/mobile/AlbumSongsViewModel.kt
index 8422dc7fc..257065467 100644
--- a/vlc-android/src/org/videolan/vlc/viewmodels/mobile/AlbumSongsViewModel.kt
+++ b/vlc-android/src/org/videolan/vlc/viewmodels/mobile/AlbumSongsViewModel.kt
@@ -52,7 +52,7 @@ class AlbumSongsViewModel(context: Context, val parent: MediaLibraryItem) : Medi
else -> watchMedia()
}
//Initial state coming from preferences and falling back to [providersInCard] hardcoded values
- for (i in 0 until displayModeKeys.size) {
+ for (i in displayModeKeys.indices) {
providersInCard[i] = settings.getBoolean(displayModeKeys[i], providersInCard[i])
}
}
More information about the Android
mailing list