Daniel
06/16/2021, 1:20 AMfun updatePreconditions(activity: Activity, playServicesPreconditionMetState: MutableState<Boolean?>, settingsPreconditionMetState: MutableState<Boolean?>): Unit
It "returns" by assigning to the states, which I think is cleaner in this case than having generic callbacks. Android Studio tells me I should write it UpdatePreconditions
, but I'd assume something named like that affected the visible uiAdam Powell
06/16/2021, 3:31 AMPreconditionUpdater
might be appropriate.MutableState<T>
objects - it's kind of like how in most cases it's a bit janky to declare functions that accept or return Pair<X, Y>
- yes it technically works, but it doesn't really carry a useful semantic meaningDaniel
06/16/2021, 4:19 AMAdam Powell
06/16/2021, 1:12 PM