chore(android): drop redundant !! on PlaylistRef.systemVariant
android / Build + lint + test (push) Successful in 3m49s
android / Build + lint + test (push) Successful in 3m49s
Line 264 already null-checks playlist.systemVariant in the if condition. PlaylistRef is a data class with a val backing field, so the smart cast narrows it to String inside the branch — the !! on line 265 was a no-op the Kotlin compiler was warning about.
This commit is contained in:
@@ -262,7 +262,7 @@ class HomeViewModel @Inject constructor(
|
|||||||
val detail = try {
|
val detail = try {
|
||||||
withTimeout(PLAYLIST_FETCH_TIMEOUT_MS) {
|
withTimeout(PLAYLIST_FETCH_TIMEOUT_MS) {
|
||||||
if (playlist.refreshable && playlist.systemVariant != null) {
|
if (playlist.refreshable && playlist.systemVariant != null) {
|
||||||
playlistsRepository.systemShuffle(playlist.systemVariant!!)
|
playlistsRepository.systemShuffle(playlist.systemVariant)
|
||||||
} else {
|
} else {
|
||||||
playlistsRepository.refreshDetail(playlist.id)
|
playlistsRepository.refreshDetail(playlist.id)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user