Colton Idle
02/02/2023, 6:40 PMAnimatedVisibility(viewModel.screenState.showSelections) { <---- This defaults to false, so I don't understand of SlideUpCarouselScreen is called
SlideUpCarouselScreen(googleMapManager!!) <!----- crash here for like 1% of our users
}
Is there a chance that even if showSelections
is false
by default, compose still runs the SlideUpCarouselScreen(//)
line? I thought if showSelections is false, it just completely skips over the inside of AnimatedVisibility {}Alex Vanyo
02/02/2023, 8:40 PMgoogleMapManager
get initialized or set back to null
?
And then same question for `showSelections`: can it go from true
back to false
?Stylianos Gakis
02/02/2023, 9:01 PMColton Idle
02/03/2023, 4:23 AMSurface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colors.background) {
AndroidView(
factory = { context ->
mapView.getMapAsync { googleMap ->
//this is where i do stuff like get the googleMapManager
}
and it's never set back to null. So basically I try to get an instance ASAP.
On top of the map theres a button, and that button toggle showSelection. So showSelection is false at first. So it's almost like getMapAsync
actually could be slow and then someone clicks the button before that method is done?
I think that's it. I feel kinda stupid that I didn't notice the getMapAsync stuff before, but maybe all of this makes sense now. :rubber_duck:Alex Vanyo
02/04/2023, 12:50 AMshowSelections
is held in a ViewModel
, it could be true
after some form of activity recreation before googleMapManager
has had a chance to recreate.Colton Idle
02/04/2023, 4:08 AM