<How to observe changes in a List when the ViewMod...
# stackoverflow
r
How to observe changes in a List when the ViewModel is in Java and the UI is in Jetpack Compose (Kotlin) I am migrating an application from View to Compose. The application was written in Java so I need to migrate the UI to Kotlin. I prefer to it as gradually as possible to I'm leaving the ViewModel in Java. The UI is a lazy column of Cards. A long click on a card toggles its selected state. It sends an event to the ViewModel - adding/deleting its ID to/from a List that contains the IDs of the selected cards. I would like the UI to observe the changes in the List of IDs. Currently, I use a...