robnik
10/18/2021, 5:35 PMMutableState
type. Is there a way to signal Compose when this computed property has changed, without keeping a separate copy of the data in my view model as a MutableState
? (In SwiftUI I do this with objectWillChange.send()
)dewildte
10/18/2021, 7:42 PMZach Klippenstein (he/him) [MOD]
10/19/2021, 4:52 PMStateFlow
, but why don’t you want to store a copy of the computed value? That value has to be in memory somewhere, and it would be a lot simpler to just publish the property via a derivedStateOf
from your view model.robnik
10/22/2021, 8:40 PMvar isPreloadingImages: Boolean
get() = PreferencesDB.shared.isPreloadingDetailsPageImages
set(newValue) { PreferencesDB.shared.isPreloadingDetailsPageImages = newValue }
I feel like I should be able to use model classes like PreferencesDB
without having to edit them to make them Compose-aware, with things like MutableState
.