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:
davotoula
2026-03-18 10:42:59 +01:00
parent c76459859d
commit 3b1b15911f
8 changed files with 15 additions and 15 deletions
@@ -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 },
)
}
@@ -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,
@@ -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) {
@@ -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,
@@ -348,7 +348,7 @@ open class ChannelNewMessageViewModel :
uploadState.selectedServer,
account,
context,
stripMetadata = uploadState.stripLocationMetadata,
stripMetadata = uploadState.stripMetadata,
)
if (results.allGood) {
@@ -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 },
)
}
@@ -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>) {