Skip to content

Commit

Permalink
Rename back to original for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
himalia416 committed Jun 17, 2024
1 parent 8a63036 commit 24d5ae5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import no.nordicsemi.android.common.permissions.wifi.viewmodel.PermissionViewMod
fun RequireLocationForWifi(
onChanged: (Boolean) -> Unit = {},
contentWithoutLocation: @Composable () -> Unit = { LocationPermissionRequiredView() },
content: @Composable (isLocationAvailable: Boolean) -> Unit,
content: @Composable (isLocationRequiredAndDisabled: Boolean) -> Unit,
) {
val viewModel = hiltViewModel<PermissionViewModel>()
val state by viewModel.locationPermission.collectAsStateWithLifecycle()
Expand All @@ -59,7 +59,7 @@ fun RequireLocationForWifi(
}

when (val s = state) {
WifiPermissionState.Available -> content(true)
WifiPermissionState.Available -> content(false)
is WifiPermissionState.NotAvailable -> when (s.reason) {
WifiPermissionNotAvailableReason.DISABLED -> LocationDisabledView()
else -> contentWithoutLocation()
Expand Down

0 comments on commit 24d5ae5

Please sign in to comment.