[Android] Improve the display settings grouping setting
Nicolas Pomepuy
git at videolan.org
Fri Nov 18 12:29:45 UTC 2022
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Nov 17 07:35:32 2022 +0100| [24d1766bd538021fd181f238f2a23a692bcbedf5] | committer: Nicolas Pomepuy
Improve the display settings grouping setting
> https://code.videolan.org/videolan/vlc-android/commit/24d1766bd538021fd181f238f2a23a692bcbedf5
---
.../src/org/videolan/vlc/gui/dialogs/DisplaySettingsDialog.kt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/DisplaySettingsDialog.kt b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/DisplaySettingsDialog.kt
index efae2c1686..120e347fb9 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/DisplaySettingsDialog.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/DisplaySettingsDialog.kt
@@ -165,7 +165,11 @@ class DisplaySettingsDialog : VLCBottomSheetDialogFragment() {
binding.videoGroupSpinner.onItemSelectedListener = object:OnItemSelectedListener {
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
val groupType = spinnerArrayAdapter.getItem(position) as VideoGroup
- lifecycleScope.launch { displaySettingsViewModel.send(SHOW_VIDEO_GROUPS, groupType) }
+ if (groupType.value != showVideoGroups) {
+ lifecycleScope.launch { displaySettingsViewModel.send(SHOW_VIDEO_GROUPS, groupType) }
+ //dismissing as changing grouping will also change the available sorts
+ dismiss()
+ }
}
override fun onNothingSelected(parent: AdapterView<*>?) { }
}
More information about the Android
mailing list