Native Android client for Spotify, built with Jetpack Compose
Kotlin ad-freeadblockandroidjetpack-composekotlinlyricsmusic-playermusic-videomyspotispotifyspotify-adblockerspotify-clientspotify-connectspotui
Revert "Fix launch crash: the lossless switch is read before the host's lazy prefs exist"
kota-zo5815227cc92b
diff --git a/base/host-android/src/main/kotlin/app/myspoti/host/android/WebPlayerHost.kt b/base/host-android/src/main/kotlin/app/myspoti/host/android/WebPlayerHost.ktindex 09aed183..9c18193b 100644--- a/base/host-android/src/main/kotlin/app/myspoti/host/android/WebPlayerHost.kt+++ b/base/host-android/src/main/kotlin/app/myspoti/host/android/WebPlayerHost.kt@@ -277,9 +277,7 @@ class WebPlayerHost(private val context: Context) : BridgeHost {it.install()}// Spotify lossless, when chosen: declared before the page's first script (see setLossless).- // Read here, not through [roots]: the first view is made while the host is being built,- // before that lazy property below is set (dev 3138 crashed at launch on it).- losslessScript = if (context.getSharedPreferences("web_player", Context.MODE_PRIVATE).getBoolean(LOSSLESS_KEY, false)) declareLossless(this) else null+ losslessScript = if (roots.getBoolean(LOSSLESS_KEY, false)) declareLossless(this) else nullval webView = thiscookies().apply {setAcceptCookie(true)