From 4271ded6aa65c4cbb9be222d3f9d39110ef070a7 Mon Sep 17 00:00:00 2001 From: William Brawner Date: Tue, 1 Oct 2024 21:17:19 -0600 Subject: [PATCH] Suppress unchecked cast for PreferenceHelper#observe I know it's not great but it works for now --- .../java/com/wbrawner/simplemarkdown/utility/PreferenceHelper.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/wbrawner/simplemarkdown/utility/PreferenceHelper.kt b/app/src/main/java/com/wbrawner/simplemarkdown/utility/PreferenceHelper.kt index 633d59f..8820283 100644 --- a/app/src/main/java/com/wbrawner/simplemarkdown/utility/PreferenceHelper.kt +++ b/app/src/main/java/com/wbrawner/simplemarkdown/utility/PreferenceHelper.kt @@ -47,6 +47,7 @@ class AndroidPreferenceHelper(context: Context, private val coroutineScope: Coro } } + @Suppress("UNCHECKED_CAST") override fun observe(preference: Preference): StateFlow = states[preference]!!.asStateFlow() as StateFlow }