mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-27 23:40:33 +05:30
Use await query for db update
This commit is contained in:
parent
85400101e2
commit
44cc6d42b2
@ -178,7 +178,9 @@ object PlaylistsHelper {
|
||||
if (transaction.videos.size > 1) {
|
||||
if (index == 0) {
|
||||
transaction.videos[1].thumbnailUrl?.let { transaction.playlist.thumbnailUrl = it }
|
||||
DatabaseHolder.Database.localPlaylistsDao().updatePlaylist(transaction.playlist)
|
||||
awaitQuery {
|
||||
DatabaseHolder.Database.localPlaylistsDao().updatePlaylist(transaction.playlist)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -185,17 +185,16 @@ class PlaylistFragment : BaseFragment() {
|
||||
}
|
||||
|
||||
val info = binding.playlistInfo.text.split(TextUtils.SEPARATOR)
|
||||
val countInfo = getString(
|
||||
R.string.videoCount,
|
||||
playlistAdapter!!.itemCount.toString()
|
||||
)
|
||||
binding.playlistInfo.text = (
|
||||
if (info.size == 2) {
|
||||
info[0] + TextUtils.SEPARATOR
|
||||
} else {
|
||||
""
|
||||
}
|
||||
) + countInfo
|
||||
) + getString(
|
||||
R.string.videoCount,
|
||||
playlistAdapter!!.itemCount.toString()
|
||||
)
|
||||
super.onItemRangeRemoved(positionStart, itemCount)
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user