[Android] Fix video group title not displayed after grouping

Nicolas Pomepuy git at videolan.org
Fri Nov 13 07:31:03 CET 2020


vlc-android | branch: 3.3.x | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Nov 12 13:49:16 2020 +0100| [67e54f9c6ba85b971485cc7835803dd57b829fda] | committer: Nicolas Pomepuy

Fix video group title not displayed after grouping

(cherry picked from commit 646476e492e57f62e1c9ef829e7b3242c27f94f9)

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

 .../vlc-android/src/org/videolan/vlc/gui/dialogs/AddToGroupDialog.kt     | 1 -
 .../src/org/videolan/vlc/viewmodels/mobile/VideosViewModel.kt            | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/AddToGroupDialog.kt b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/AddToGroupDialog.kt
index bfe4559dc..2fa35e1a7 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/dialogs/AddToGroupDialog.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/dialogs/AddToGroupDialog.kt
@@ -90,7 +90,6 @@ class AddToGroupDialog : VLCBottomSheetDialogFragment(), SimpleAdapter.ClickHand
         }
 
         forbidNewGroup = try {
-            @Suppress("UNCHECKED_CAST")
             requireArguments().getBoolean(FORBID_NEW_GROUP)
         } catch (e: Exception) {
             true
diff --git a/application/vlc-android/src/org/videolan/vlc/viewmodels/mobile/VideosViewModel.kt b/application/vlc-android/src/org/videolan/vlc/viewmodels/mobile/VideosViewModel.kt
index dacf9a793..e8bb570fa 100644
--- a/application/vlc-android/src/org/videolan/vlc/viewmodels/mobile/VideosViewModel.kt
+++ b/application/vlc-android/src/org/videolan/vlc/viewmodels/mobile/VideosViewModel.kt
@@ -197,6 +197,7 @@ class VideosViewModel(context: Context, type: VideoGroupingType, val folder: Fol
             val newGroup = medialibrary.createVideoGroup(medias.map { it.id }.toLongArray())
             if (newGroup.title.isNullOrBlank()) {
                 newGroup.rename(medias[0].title)
+                newGroup.title = medias[0].title
             }
             newGroup
         }



More information about the Android mailing list