π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Don't let it edit also
laurenspriemedc9e7dad410
diff --git a/mobile/native/android/apps/ensu/domain/src/main/kotlin/io/ente/ensu/domain/store/AppStore.kt b/mobile/native/android/apps/ensu/domain/src/main/kotlin/io/ente/ensu/domain/store/AppStore.ktindex d3203cd75e..c610986d2b 100644--- a/mobile/native/android/apps/ensu/domain/src/main/kotlin/io/ente/ensu/domain/store/AppStore.kt+++ b/mobile/native/android/apps/ensu/domain/src/main/kotlin/io/ente/ensu/domain/store/AppStore.kt@@ -81,7 +81,10 @@ class AppStore(isDownloading = if (unsupported) false else _state.value.chat.isDownloading,downloadPercent = if (unsupported) null else _state.value.chat.downloadPercent,downloadStatus = if (unsupported) null else _state.value.chat.downloadStatus,- hasRequestedModelDownload = if (unsupported) false else _state.value.chat.hasRequestedModelDownload+ hasRequestedModelDownload = if (unsupported) false else _state.value.chat.hasRequestedModelDownload,+ editingMessageId = if (unsupported) null else _state.value.chat.editingMessageId,+ messageText = if (unsupported) "" else _state.value.chat.messageText,+ attachments = if (unsupported) emptyList() else _state.value.chat.attachments))if (unsupported) {diff --git a/mobile/native/android/apps/ensu/domain/src/main/kotlin/io/ente/ensu/domain/store/ChatStoreActions.kt b/mobile/native/android/apps/ensu/domain/src/main/kotlin/io/ente/ensu/domain/store/ChatStoreActions.ktindex 3c8f932982..78e9b1ad9c 100644--- a/mobile/native/android/apps/ensu/domain/src/main/kotlin/io/ente/ensu/domain/store/ChatStoreActions.kt+++ b/mobile/native/android/apps/ensu/domain/src/main/kotlin/io/ente/ensu/domain/store/ChatStoreActions.kt@@ -250,7 +250,9 @@ internal class ChatStoreActions(}fun beginEditing(messageId: String) {- val sessionId = state.value.chat.currentSessionId ?: return+ val currentState = state.value+ if (!currentState.chat.deviceCapability.isChatSupported()) return+ val sessionId = currentState.chat.currentSessionId ?: returnval message = messageStore[sessionId]?.firstOrNull { it.id == messageId } ?: returnif (message.author != MessageAuthor.User) returndiff --git a/mobile/native/darwin/Apps/Ensu/Ensu/Chat/ChatViewModel.swift b/mobile/native/darwin/Apps/Ensu/Ensu/Chat/ChatViewModel.swiftindex 337c1878dd..50ca581962 100644--- a/mobile/native/darwin/Apps/Ensu/Ensu/Chat/ChatViewModel.swift+++ b/mobile/native/darwin/Apps/Ensu/Ensu/Chat/ChatViewModel.swift@@ -631,6 +631,9 @@ final class ChatViewModel: ObservableObject {downloadProgressMonitorTask?.cancel()sharedModelReadyTask?.cancel()clearSharedModelReadyTask()+ editingMessageId = nil+ draftText = ""+ draftAttachments = []provider.cancelDownload()}@@ -1053,6 +1056,10 @@ final class ChatViewModel: ObservableObject {}func beginEditing(message: RenderedChatMessage) {+ guard !isChatUnsupported else {+ showUnsupportedDeviceDialog = true+ return+ }guard message.role == .user else { return }editingMessageId = message.iddraftText = message.text