v

    Vinay Gaba

    1 year ago
    Noticing some weird issues as I’m trying to upgrade my library to beta-01. Think that some mutable state values are only being propagated once I minimize the app and open it again. Anyone notice something of this flavor or an existing bug that might’ve been discussed already?
    Adam Powell

    Adam Powell

    1 year ago
    if you listen for changes with a
    snapshotFlow {}
    does it emit values for changes or no?
    v

    Vinay Gaba

    1 year ago
    I was trying to remember what lets me debug and monitor these changes. Giving this a shot!
    Adam Powell

    Adam Powell

    1 year ago
    you can also use the direct
    Snapshot.register
    method to register an apply observer which will be a bit more direct/immediate, but the flow should be enough to tell if snspahots are being applied at all or not
    v

    Vinay Gaba

    1 year ago
    I used
    Snapshot.sendApplyNotifications()
    after updating the state properties to make sure that the changes are propagated. Strangely enough, I don’t see my print statements or debug points being triggered for the
    snapshotFlow
    . This is how I was using it.
    snapshotFlow { showkaseBrowserScreenMetadata.value.currentGroup }
       .map {          
           Log.e("Debug", it.toString())
        }
    Here
    showkaseBrowserScreenMetadata
    is a
    MutableState
    object and the value it holds is a data class with a few properties. It’s initialized using this line
    val showkaseBrowserScreenMetadata = 
        remember { mutableStateOf(ShowkaseBrowserScreenMetadata()) }
    Adam Powell

    Adam Powell

    1 year ago
    odd. File a repro if you can isolate one
    v

    Vinay Gaba

    1 year ago
    sounds good! Thanks for your help 🙏🏼