fix: location disclosure missing
This commit is contained in:
parent
ffeb089aa7
commit
7e3405f3fd
|
@ -269,9 +269,8 @@ fun SettingsScreen(
|
||||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) {
|
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) {
|
||||||
checkFineLocationGranted()
|
checkFineLocationGranted()
|
||||||
}
|
}
|
||||||
|
if(!uiState.isLocationDisclosureShown) {
|
||||||
BackgroundLocationDisclosure(
|
BackgroundLocationDisclosure(
|
||||||
!uiState.isLocationDisclosureShown,
|
|
||||||
onDismiss = { viewModel.setLocationDisclosureShown() },
|
onDismiss = { viewModel.setLocationDisclosureShown() },
|
||||||
onAttest = {
|
onAttest = {
|
||||||
context.launchAppSettings()
|
context.launchAppSettings()
|
||||||
|
@ -280,6 +279,9 @@ fun SettingsScreen(
|
||||||
scrollState,
|
scrollState,
|
||||||
focusRequester,
|
focusRequester,
|
||||||
)
|
)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BackgroundLocationDialog(
|
BackgroundLocationDialog(
|
||||||
showLocationDialog,
|
showLocationDialog,
|
||||||
|
|
|
@ -29,14 +29,12 @@ import com.zaneschepke.wireguardautotunnel.util.extensions.isRunningOnTv
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun BackgroundLocationDisclosure(
|
fun BackgroundLocationDisclosure(
|
||||||
show: Boolean,
|
|
||||||
onDismiss: () -> Unit,
|
onDismiss: () -> Unit,
|
||||||
onAttest: () -> Unit,
|
onAttest: () -> Unit,
|
||||||
scrollState: ScrollState,
|
scrollState: ScrollState,
|
||||||
focusRequester: FocusRequester,
|
focusRequester: FocusRequester,
|
||||||
) {
|
) {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
if (show) {
|
|
||||||
Column(
|
Column(
|
||||||
horizontalAlignment = Alignment.CenterHorizontally,
|
horizontalAlignment = Alignment.CenterHorizontally,
|
||||||
verticalArrangement = Arrangement.Top,
|
verticalArrangement = Arrangement.Top,
|
||||||
|
@ -92,5 +90,4 @@ fun BackgroundLocationDisclosure(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue