feat: add privacy toggle to ImageVideoDescription
Add stripMetadata state and SettingSwitchItem toggle. Extend onAdd callback signature with 6th Boolean parameter for stripMetadata. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+15
-2
@@ -79,7 +79,7 @@ fun ImageVideoDescription(
|
|||||||
uris: MultiOrchestrator,
|
uris: MultiOrchestrator,
|
||||||
defaultServer: ServerName,
|
defaultServer: ServerName,
|
||||||
isUploading: Boolean,
|
isUploading: Boolean,
|
||||||
onAdd: (String, ServerName, Boolean, Int, Boolean) -> Unit,
|
onAdd: (String, ServerName, Boolean, Int, Boolean, Boolean) -> Unit,
|
||||||
onDelete: (SelectedMediaProcessing) -> Unit,
|
onDelete: (SelectedMediaProcessing) -> Unit,
|
||||||
onCancel: () -> Unit,
|
onCancel: () -> Unit,
|
||||||
accountViewModel: AccountViewModel,
|
accountViewModel: AccountViewModel,
|
||||||
@@ -108,6 +108,8 @@ fun ImageVideoDescription(
|
|||||||
// Codec selection: false = H264, true = H265
|
// Codec selection: false = H264, true = H265
|
||||||
var useH265Codec by remember { mutableStateOf(false) }
|
var useH265Codec by remember { mutableStateOf(false) }
|
||||||
|
|
||||||
|
var stripMetadata by remember { mutableStateOf(true) }
|
||||||
|
|
||||||
Column(
|
Column(
|
||||||
modifier =
|
modifier =
|
||||||
Modifier
|
Modifier
|
||||||
@@ -248,6 +250,17 @@ fun ImageVideoDescription(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SettingSwitchItem(
|
||||||
|
title = R.string.strip_metadata_label,
|
||||||
|
description = R.string.strip_metadata_description,
|
||||||
|
modifier =
|
||||||
|
Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(top = 8.dp),
|
||||||
|
checked = stripMetadata,
|
||||||
|
onCheckedChange = { stripMetadata = it },
|
||||||
|
)
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
modifier =
|
modifier =
|
||||||
@@ -321,7 +334,7 @@ fun ImageVideoDescription(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(vertical = 10.dp),
|
.padding(vertical = 10.dp),
|
||||||
enabled = !isUploading,
|
enabled = !isUploading,
|
||||||
onClick = { onAdd(message, selectedServer, sensitiveContent, mediaQualitySlider, useH265Codec) },
|
onClick = { onAdd(message, selectedServer, sensitiveContent, mediaQualitySlider, useH265Codec, stripMetadata) },
|
||||||
shape = QuoteBorder,
|
shape = QuoteBorder,
|
||||||
colors =
|
colors =
|
||||||
ButtonDefaults.buttonColors(
|
ButtonDefaults.buttonColors(
|
||||||
|
|||||||
Reference in New Issue
Block a user