Fix library column setting jumping in

This commit is contained in:
arkon
2022-07-16 18:26:30 -04:00
parent 1b2c12385f
commit f6f5b6aeab
13 changed files with 33 additions and 66 deletions

View File

@@ -13,7 +13,7 @@ fun CompoundButton.bindToPreference(pref: Preference<Boolean>) {
setOnCheckedChangeListener { _, isChecked -> pref.set(isChecked) }
}
fun <T> Preference<T>.asImmediateFlow(block: (T) -> Unit): Flow<T> {
fun <T> Preference<T>.asHotFlow(block: (T) -> Unit): Flow<T> {
block(get())
return asFlow()
.onEach { block(it) }