mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-01-06 01:20:29 +05:30
Fix crash when removing video from playlist
This commit is contained in:
parent
f084b1ec06
commit
7318f7863d
@ -102,6 +102,7 @@ class PlaylistAdapter(
|
|||||||
|
|
||||||
fun removeFromPlaylist(context: Context, position: Int) {
|
fun removeFromPlaylist(context: Context, position: Int) {
|
||||||
videoFeed.removeAt(position)
|
videoFeed.removeAt(position)
|
||||||
|
visibleCount -= 1
|
||||||
(context as Activity).runOnUiThread {
|
(context as Activity).runOnUiThread {
|
||||||
notifyItemRemoved(position)
|
notifyItemRemoved(position)
|
||||||
notifyItemRangeChanged(position, itemCount)
|
notifyItemRangeChanged(position, itemCount)
|
||||||
|
Loading…
Reference in New Issue
Block a user