[Android] Fix JobCancellationException
Nicolas Pomepuy
git at videolan.org
Tue Oct 6 10:58:46 CEST 2020
vlc-android | branch: 3.3.x | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Oct 2 07:10:57 2020 +0200| [3aefab30a922758efffbbd58ee10d8e9d049b8e0] | committer: Nicolas Pomepuy
Fix JobCancellationException
(cherry picked from commit 99b4651f01dd08a6660e873016a6e9898603ff49)
> https://code.videolan.org/videolan/vlc-android/commit/3aefab30a922758efffbbd58ee10d8e9d049b8e0
---
.../vlc-android/src/org/videolan/vlc/viewmodels/PlaylistModel.kt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/viewmodels/PlaylistModel.kt b/application/vlc-android/src/org/videolan/vlc/viewmodels/PlaylistModel.kt
index 14523f0b6..c4f696a6f 100644
--- a/application/vlc-android/src/org/videolan/vlc/viewmodels/PlaylistModel.kt
+++ b/application/vlc-android/src/org/videolan/vlc/viewmodels/PlaylistModel.kt
@@ -32,6 +32,7 @@ import kotlinx.coroutines.flow.onEach
import org.videolan.medialibrary.Tools
import org.videolan.medialibrary.interfaces.media.MediaWrapper
import org.videolan.tools.livedata.LiveDataset
+import org.videolan.tools.safeOffer
import org.videolan.vlc.PlaybackService
import org.videolan.vlc.media.PlaylistManager
import org.videolan.vlc.util.EmptyPBSCallback
@@ -96,7 +97,7 @@ class PlaylistModel : ViewModel(), PlaybackService.Callback by EmptyPBSCallback
this.filtering = filtering
originalDataset = if (filtering) dataset.value.toMutableList() else null
}
- filterActor.offer(query)
+ filterActor.safeOffer(query)
}
val title
More information about the Android
mailing list