mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50: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>() {
|
RecyclerView.Adapter<WatchHistoryViewHolder>() {
|
||||||
|
|
||||||
fun removeFromWatchHistory(position: Int) {
|
fun removeFromWatchHistory(position: Int) {
|
||||||
|
val history = watchHistory[position]
|
||||||
query {
|
query {
|
||||||
DatabaseHolder.Database.watchHistoryDao().delete(watchHistory[position])
|
DatabaseHolder.Database.watchHistoryDao().delete(history)
|
||||||
}
|
}
|
||||||
watchHistory.removeAt(position)
|
watchHistory.removeAt(position)
|
||||||
notifyItemRemoved(position)
|
notifyItemRemoved(position)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user