Merge pull request #2338 from Bnyro/master

fix crash at playlist page
This commit is contained in:
Bnyro 2022-12-10 16:48:55 +01:00 committed by GitHub
commit 096a9dffad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -243,8 +243,10 @@ class PlaylistFragment : BaseFragment() {
} }
// update the playlist thumbnail if bookmarked // update the playlist thumbnail if bookmarked
val playlistBookmark = DatabaseHolder.Database.playlistBookmarkDao().getAll() val playlistBookmark = awaitQuery {
.firstOrNull { it.playlistId == playlistId } DatabaseHolder.Database.playlistBookmarkDao().getAll()
.firstOrNull { it.playlistId == playlistId }
}
playlistBookmark?.let { playlistBookmark?.let {
if (playlistBookmark.thumbnailUrl != response.thumbnailUrl) { if (playlistBookmark.thumbnailUrl != response.thumbnailUrl) {
playlistBookmark.thumbnailUrl = response.thumbnailUrl playlistBookmark.thumbnailUrl = response.thumbnailUrl