Utilize kotlins ifEmpty
This commit is contained in:
parent
62f224e01c
commit
b6902e2587
1 changed files with 1 additions and 5 deletions
|
|
@ -62,11 +62,7 @@ data class PlaylistRemoteEntity(
|
||||||
orderingName = playlistInfo.name,
|
orderingName = playlistInfo.name,
|
||||||
url = playlistInfo.url,
|
url = playlistInfo.url,
|
||||||
thumbnailUrl = ImageStrategy.imageListToDbUrl(
|
thumbnailUrl = ImageStrategy.imageListToDbUrl(
|
||||||
if (playlistInfo.thumbnails.isEmpty()) {
|
playlistInfo.thumbnails.ifEmpty { playlistInfo.uploaderAvatars }
|
||||||
playlistInfo.uploaderAvatars
|
|
||||||
} else {
|
|
||||||
playlistInfo.thumbnails
|
|
||||||
}
|
|
||||||
),
|
),
|
||||||
uploader = playlistInfo.uploaderName,
|
uploader = playlistInfo.uploaderName,
|
||||||
streamCount = playlistInfo.streamCount
|
streamCount = playlistInfo.streamCount
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue