From 24d5ae5908f2bbe5f2677fdec61f2ae5dc016a75 Mon Sep 17 00:00:00 2001 From: hiar Date: Mon, 17 Jun 2024 13:54:24 +0200 Subject: [PATCH] Rename back to original for consistency --- .../android/common/permissions/wifi/RequireLocationForWifi.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/permissions-wifi/src/main/java/no/nordicsemi/android/common/permissions/wifi/RequireLocationForWifi.kt b/permissions-wifi/src/main/java/no/nordicsemi/android/common/permissions/wifi/RequireLocationForWifi.kt index b95546ff..b4fbbb3b 100644 --- a/permissions-wifi/src/main/java/no/nordicsemi/android/common/permissions/wifi/RequireLocationForWifi.kt +++ b/permissions-wifi/src/main/java/no/nordicsemi/android/common/permissions/wifi/RequireLocationForWifi.kt @@ -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() val state by viewModel.locationPermission.collectAsStateWithLifecycle() @@ -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()