Merge pull request #2619 from Bnyro/master

Fix crash when removing video from playlist
This commit is contained in:
Bnyro 2023-01-06 21:39:50 +01:00 committed by GitHub
commit 71b94a23cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,6 +102,7 @@ class PlaylistAdapter(
fun removeFromPlaylist(context: Context, position: Int) {
videoFeed.removeAt(position)
visibleCount -= 1
(context as Activity).runOnUiThread {
notifyItemRemoved(position)
notifyItemRangeChanged(position, itemCount)