[UPDATED WITH SOME CODE] What happens when I exit ...
# compose
n
[UPDATED WITH SOME CODE] What happens when I exit and restart my app that means my function to update my Boolean in my room database finally works? I am trying to work out what I am missing that happens at onCreate time but does not happen otherwise. I use this code in a onClick function... 🧵
Copy code
viewModel.updateTileState(
                    tileState = SavedState(
                        index,
                        visible = false,
                        enabled = false
                    )
                )
It works the first time. Then when I reset everything and use the update function again, nothing happens. If I restart the app, the update function works again.
I'm not sure if this is strictly Compose related. If not, I'll move my question to the android thread.
l
There's not really enough information here to be able to diagnose what's happening
👍 1
n
Fair enough, I just thought it might be something obvious to room/compose experts.
l
People might be able to help - just needs more context and more code to help us understand what we're looking at Have you tried putting breakpoints in your code to see what's being hit and what isn't?
n
Solved it, thanks!