mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 14:55:26 +02:00
feat: Do not show a warning for custom folders anymore
Signed-off-by: Myzel394 <50424412+Myzel394@users.noreply.github.com>
This commit is contained in:
parent
f8c1db495d
commit
e0dce7d359
@ -26,7 +26,6 @@ import androidx.compose.material.icons.filled.Folder
|
||||
import androidx.compose.material.icons.filled.Lock
|
||||
import androidx.compose.material.icons.filled.Mic
|
||||
import androidx.compose.material.icons.filled.PermMedia
|
||||
import androidx.compose.material.icons.filled.Warning
|
||||
import androidx.compose.material3.AlertDialog
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
@ -435,8 +434,6 @@ fun SelectionSheet(
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
|
||||
var showCustomFolderWarning by remember { mutableStateOf(false) }
|
||||
|
||||
val selectFolder = rememberFolderSelectorDialog { folder ->
|
||||
if (folder == null) {
|
||||
return@rememberFolderSelectorDialog
|
||||
@ -445,18 +442,6 @@ fun SelectionSheet(
|
||||
updateValue(folder.toString())
|
||||
}
|
||||
|
||||
if (showCustomFolderWarning) {
|
||||
CustomFolderWarningDialog(
|
||||
onDismiss = {
|
||||
showCustomFolderWarning = false
|
||||
},
|
||||
onConfirm = {
|
||||
showCustomFolderWarning = false
|
||||
selectFolder()
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
var showExternalPermissionRequired by remember { mutableStateOf(false) }
|
||||
|
||||
if (showExternalPermissionRequired) {
|
||||
@ -523,9 +508,7 @@ fun SelectionSheet(
|
||||
SelectionButton(
|
||||
label = stringResource(R.string.ui_settings_option_saveFolder_action_custom_label),
|
||||
icon = Icons.Default.Folder,
|
||||
onClick = {
|
||||
showCustomFolderWarning = true
|
||||
},
|
||||
onClick = selectFolder,
|
||||
)
|
||||
if (!SUPPORTS_SAVING_VIDEOS_IN_CUSTOM_FOLDERS) {
|
||||
Column(
|
||||
@ -581,52 +564,6 @@ fun SelectionButton(
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun CustomFolderWarningDialog(
|
||||
onDismiss: () -> Unit,
|
||||
onConfirm: () -> Unit,
|
||||
) {
|
||||
val title = stringResource(R.string.ui_settings_option_saveFolder_warning_title)
|
||||
val text = stringResource(R.string.ui_settings_option_saveFolder_warning_text)
|
||||
|
||||
AlertDialog(
|
||||
icon = {
|
||||
Icon(
|
||||
Icons.Default.Warning,
|
||||
contentDescription = null,
|
||||
)
|
||||
},
|
||||
onDismissRequest = onDismiss,
|
||||
title = {
|
||||
Text(text = title)
|
||||
},
|
||||
text = {
|
||||
Text(text = text)
|
||||
},
|
||||
confirmButton = {
|
||||
Button(onClick = onConfirm) {
|
||||
Text(
|
||||
text = stringResource(R.string.ui_settings_option_saveFolder_warning_action_confirm),
|
||||
)
|
||||
}
|
||||
},
|
||||
dismissButton = {
|
||||
TextButton(
|
||||
onClick = onDismiss,
|
||||
contentPadding = ButtonDefaults.TextButtonWithIconContentPadding,
|
||||
) {
|
||||
Icon(
|
||||
Icons.Default.Cancel,
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(ButtonDefaults.IconSize),
|
||||
)
|
||||
Spacer(modifier = Modifier.width(ButtonDefaults.IconSpacing))
|
||||
Text(stringResource(R.string.dialog_close_cancel_label))
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun ExternalPermissionRequiredDialog(
|
||||
onDismiss: () -> Unit,
|
||||
|
Loading…
x
Reference in New Issue
Block a user