mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 06:10:31 +05:30
Fix wrong history deleted because of different thread
This commit is contained in:
parent
641f2a9c10
commit
f76da90447
@ -21,8 +21,9 @@ class WatchHistoryAdapter(
|
||||
RecyclerView.Adapter<WatchHistoryViewHolder>() {
|
||||
|
||||
fun removeFromWatchHistory(position: Int) {
|
||||
val history = watchHistory[position]
|
||||
query {
|
||||
DatabaseHolder.Database.watchHistoryDao().delete(watchHistory[position])
|
||||
DatabaseHolder.Database.watchHistoryDao().delete(history)
|
||||
}
|
||||
watchHistory.removeAt(position)
|
||||
notifyItemRemoved(position)
|
||||
|
Loading…
Reference in New Issue
Block a user