Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix flicker during download

laurenspriem14852c33ef59
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.kt
index fab028d9cf..b1f46439e4 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
@@ -117,6 +117,8 @@ internal class ChatStoreActions(
}
fun startNewSessionDraft() {
+ if (state.value.chat.isDownloading) return
+
resetGenerationState()
state.update { appState ->
appState.copy(
diff --git a/mobile/native/darwin/Apps/Ensu/Ensu/Chat/ChatViewModel.swift b/mobile/native/darwin/Apps/Ensu/Ensu/Chat/ChatViewModel.swift
index 00cb778e3f..c55678f432 100644
--- a/mobile/native/darwin/Apps/Ensu/Ensu/Chat/ChatViewModel.swift
+++ b/mobile/native/darwin/Apps/Ensu/Ensu/Chat/ChatViewModel.swift
@@ -790,6 +790,8 @@ final class ChatViewModel: ObservableObject {
}
func startNewSession() {
+ guard !isDownloading else { return }
+
resetGenerationState()
cancelVoiceInput()
draftText = ""