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) {
|
||||
checkFineLocationGranted()
|
||||
}
|
||||
|
||||
if(!uiState.isLocationDisclosureShown) {
|
||||
BackgroundLocationDisclosure(
|
||||
!uiState.isLocationDisclosureShown,
|
||||
onDismiss = { viewModel.setLocationDisclosureShown() },
|
||||
onAttest = {
|
||||
context.launchAppSettings()
|
||||
|
@ -280,6 +279,9 @@ fun SettingsScreen(
|
|||
scrollState,
|
||||
focusRequester,
|
||||
)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
BackgroundLocationDialog(
|
||||
showLocationDialog,
|
||||
|
|
|
@ -29,14 +29,12 @@ import com.zaneschepke.wireguardautotunnel.util.extensions.isRunningOnTv
|
|||
|
||||
@Composable
|
||||
fun BackgroundLocationDisclosure(
|
||||
show: Boolean,
|
||||
onDismiss: () -> Unit,
|
||||
onAttest: () -> Unit,
|
||||
scrollState: ScrollState,
|
||||
focusRequester: FocusRequester,
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
if (show) {
|
||||
Column(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
verticalArrangement = Arrangement.Top,
|
||||
|
@ -92,5 +90,4 @@ fun BackgroundLocationDisclosure(
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue