From 7318f7863db357e36cece6138c086dacf30fc67c Mon Sep 17 00:00:00 2001 From: Bnyro Date: Fri, 6 Jan 2023 21:39:34 +0100 Subject: [PATCH] Fix crash when removing video from playlist --- .../java/com/github/libretube/ui/adapters/PlaylistAdapter.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/github/libretube/ui/adapters/PlaylistAdapter.kt b/app/src/main/java/com/github/libretube/ui/adapters/PlaylistAdapter.kt index 08ec8ecaf..a39275984 100644 --- a/app/src/main/java/com/github/libretube/ui/adapters/PlaylistAdapter.kt +++ b/app/src/main/java/com/github/libretube/ui/adapters/PlaylistAdapter.kt @@ -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)