oday
10/13/2022, 3:42 PMwhen
like this one
when (locationState) {
!is LocationState.Set -> {}
is LocationState.Disabled -> onLocationDisabled()
is LocationState.NotGranted -> onLocationNotGranted()
else -> Unit
}
all the conditions after the first !is LocationState.Set
are now unreachable?Adam Cooper
10/13/2022, 3:44 PMlocationState
were Disabled
or NotGranted
, then it would also not be Set
.oday
10/13/2022, 3:44 PModay
10/13/2022, 3:45 PModay
10/13/2022, 3:46 PMAdam Cooper
10/13/2022, 3:46 PM!Set
if it is Disabled
or NotGranted
oday
10/13/2022, 3:46 PModay
10/13/2022, 3:46 PModay
10/13/2022, 3:46 PMAdam Cooper
10/13/2022, 3:46 PModay
10/13/2022, 3:46 PM