Merge pull request #2347 from Bnyro/master

fix crash at playlist page
This commit is contained in:
Bnyro 2022-12-11 11:55:41 +01:00 committed by GitHub
commit 2a24712a9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -245,8 +245,7 @@ class PlaylistFragment : BaseFragment() {
// update the playlist thumbnail if bookmarked // update the playlist thumbnail if bookmarked
val playlistBookmark = awaitQuery { val playlistBookmark = awaitQuery {
DatabaseHolder.Database.playlistBookmarkDao().getAll() DatabaseHolder.Database.playlistBookmarkDao().getAll()
.firstOrNull { it.playlistId == playlistId } }.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