Eric Boggs
09/23/2021, 9:59 PMEric Boggs
09/23/2021, 10:00 PMZach Klippenstein (he/him) [MOD]
09/23/2021, 11:27 PMmap
just returns a new list with the result of the map function, so if you’re not assigning the returned value to anything it’s effectively a no-op.Zach Klippenstein (he/him) [MOD]
09/23/2021, 11:28 PMdeepCopy
is trying to solve.Zach Klippenstein (he/him) [MOD]
09/23/2021, 11:29 PMselectedId
property, which your composable could then compare to each article ID. That way you don’t need to walk the entire list in your view model every time the selection changes, and it means that if only the selection changes then only the two rows that actually had their selection state change need to recompose.Alex Vanyo
09/23/2021, 11:31 PMvar isSelected: Boolean
in your Tag
class.
This means that you have a mutable object inside an observable type, and the observable type has no way of knowing when the mutable object changes.Zach Klippenstein (he/him) [MOD]
09/23/2021, 11:32 PMEric Boggs
09/24/2021, 12:17 AMZach Klippenstein (he/him) [MOD]
09/24/2021, 12:18 AMI wasn’t sure how to push a deeply nested change as something that would trigger StateFlow to recognize the changeAs long as the equals method returns false, that will happen.
Eric Boggs
09/24/2021, 7:32 PM