Skip to content

armgit / ente

Public Imported from GitHub
0

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

fix issue with message duplication

Prateek Sunalb6e7fb65f7fc
diff --git a/mobile/native/darwin/Apps/ensu/ensu/Chat/MessageListView.swift b/mobile/native/darwin/Apps/ensu/ensu/Chat/MessageListView.swift
index 67852a6d86..9f45623b27 100644
--- a/mobile/native/darwin/Apps/ensu/ensu/Chat/MessageListView.swift
+++ b/mobile/native/darwin/Apps/ensu/ensu/Chat/MessageListView.swift
@@ -226,7 +226,8 @@ struct MessageListView: View {
let shouldShowStreaming = isGenerating
let streamingDisplayText = streamingResponse
- let outroAssistantId = (!isGenerating && showStreamingBubble) ? resolvedStreamingAssistantReplyId() : nil
+ let isOutroActive = !isGenerating && (showStreamingBubble || streamingWasGenerating)
+ let outroAssistantId = isOutroActive ? resolvedStreamingAssistantReplyId() : nil
ForEach(messages) { message in
if message.role == .user {
@@ -267,7 +268,7 @@ struct MessageListView: View {
.padding(.horizontal, EnsuSpacing.pageHorizontal)
.padding(.top, EnsuSpacing.lg)
.padding(.bottom, EnsuSpacing.lg)
- .animation(isGenerating ? .spring(response: 0.35, dampingFraction: 0.86) : nil, value: messages.count)
+ .animation(nil, value: messages.count)
Color.clear
.frame(height: contentBottomPadding)
@@ -288,7 +289,7 @@ struct MessageListView: View {
}
private var messageTransition: AnyTransition {
- .move(edge: .bottom).combined(with: .opacity)
+ .identity
}
private var streamingTransition: AnyTransition {