feat: rename stripLocationMetadata to stripMetadata in UI state and dialogs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -66,7 +66,7 @@ open class NewMediaModel : ViewModel() {
|
||||
var useH265Codec by mutableStateOf(false)
|
||||
|
||||
// Strip location and sensitive metadata from files before upload
|
||||
var stripLocationMetadata by mutableStateOf(true)
|
||||
var stripMetadata by mutableStateOf(true)
|
||||
|
||||
open fun load(
|
||||
account: Account,
|
||||
@@ -76,7 +76,7 @@ open class NewMediaModel : ViewModel() {
|
||||
this.account = account
|
||||
this.multiOrchestrator = MultiOrchestrator(uris)
|
||||
this.selectedServer = defaultServer()
|
||||
this.stripLocationMetadata = account.settings.stripLocationOnUpload
|
||||
this.stripMetadata = account.settings.stripLocationOnUpload
|
||||
}
|
||||
|
||||
fun isImage(
|
||||
@@ -119,7 +119,7 @@ open class NewMediaModel : ViewModel() {
|
||||
myAccount,
|
||||
context,
|
||||
useH265Codec,
|
||||
stripLocationMetadata,
|
||||
stripMetadata,
|
||||
)
|
||||
|
||||
if (results.allGood) {
|
||||
|
||||
@@ -112,7 +112,7 @@ fun NewMediaView(
|
||||
postViewModel.selectedServer?.let {
|
||||
account.settings.changeDefaultFileServer(it)
|
||||
}
|
||||
account.settings.changeStripLocationOnUpload(postViewModel.stripLocationMetadata)
|
||||
account.settings.changeStripLocationOnUpload(postViewModel.stripMetadata)
|
||||
},
|
||||
)
|
||||
},
|
||||
@@ -278,7 +278,7 @@ fun ImageVideoPost(
|
||||
Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(top = 8.dp),
|
||||
checked = postViewModel.stripLocationMetadata,
|
||||
onCheckedChange = { postViewModel.stripLocationMetadata = it },
|
||||
checked = postViewModel.stripMetadata,
|
||||
onCheckedChange = { postViewModel.stripMetadata = it },
|
||||
)
|
||||
}
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ fun RoomChatFileUploadDialog(
|
||||
)
|
||||
|
||||
accountViewModel.account.settings.changeDefaultFileServer(state.selectedServer)
|
||||
accountViewModel.account.settings.changeStripLocationOnUpload(state.stripLocationMetadata)
|
||||
accountViewModel.account.settings.changeStripLocationOnUpload(state.stripMetadata)
|
||||
},
|
||||
onCancel,
|
||||
accountViewModel,
|
||||
|
||||
+2
-2
@@ -104,7 +104,7 @@ class ChatFileUploader(
|
||||
viewState.selectedServer,
|
||||
account,
|
||||
context,
|
||||
stripMetadata = viewState.stripLocationMetadata,
|
||||
stripMetadata = viewState.stripMetadata,
|
||||
)
|
||||
|
||||
if (results.allGood) {
|
||||
@@ -149,7 +149,7 @@ class ChatFileUploader(
|
||||
viewState.selectedServer,
|
||||
account,
|
||||
context,
|
||||
stripMetadata = viewState.stripLocationMetadata,
|
||||
stripMetadata = viewState.stripMetadata,
|
||||
)
|
||||
|
||||
if (results.allGood) {
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ fun ChannelFileUploadDialog(
|
||||
)
|
||||
|
||||
accountViewModel.account.settings.changeDefaultFileServer(state.selectedServer)
|
||||
accountViewModel.account.settings.changeStripLocationOnUpload(state.stripLocationMetadata)
|
||||
accountViewModel.account.settings.changeStripLocationOnUpload(state.stripMetadata)
|
||||
},
|
||||
onCancel,
|
||||
accountViewModel,
|
||||
|
||||
+1
-1
@@ -348,7 +348,7 @@ open class ChannelNewMessageViewModel :
|
||||
uploadState.selectedServer,
|
||||
account,
|
||||
context,
|
||||
stripMetadata = uploadState.stripLocationMetadata,
|
||||
stripMetadata = uploadState.stripMetadata,
|
||||
)
|
||||
|
||||
if (results.allGood) {
|
||||
|
||||
+2
-2
@@ -265,8 +265,8 @@ private fun ImageVideoPostChat(
|
||||
title = R.string.strip_metadata_label,
|
||||
description = R.string.strip_metadata_description,
|
||||
modifier = Modifier.fillMaxWidth().padding(top = 8.dp),
|
||||
checked = fileUploadState.stripLocationMetadata,
|
||||
onCheckedChange = { fileUploadState.stripLocationMetadata = it },
|
||||
checked = fileUploadState.stripMetadata,
|
||||
onCheckedChange = { fileUploadState.stripMetadata = it },
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -36,7 +36,7 @@ import kotlinx.collections.immutable.ImmutableList
|
||||
@Stable
|
||||
class ChatFileUploadState(
|
||||
val defaultServer: ServerName,
|
||||
defaultStripLocationMetadata: Boolean = true,
|
||||
defaultStripMetadata: Boolean = true,
|
||||
) {
|
||||
val mediaUploadTracker = MediaUploadTracker()
|
||||
val isUploadingImage: Boolean get() = mediaUploadTracker.isUploadingImage
|
||||
@@ -56,7 +56,7 @@ class ChatFileUploadState(
|
||||
// 0 = Low, 1 = Medium, 2 = High, 3=UNCOMPRESSED
|
||||
var mediaQualitySlider by mutableIntStateOf(1)
|
||||
|
||||
var stripLocationMetadata by mutableStateOf(defaultStripLocationMetadata)
|
||||
var stripMetadata by mutableStateOf(defaultStripMetadata)
|
||||
var encryptFiles by mutableStateOf(true)
|
||||
|
||||
fun load(uris: ImmutableList<SelectedMedia>) {
|
||||
|
||||
Reference in New Issue
Block a user