Private
Public Access
1
0

autosyncing, appearance tweaks

This commit is contained in:
2025-08-25 00:37:48 -07:00
parent f0fd738935
commit 402b5a5f80
7 changed files with 64 additions and 11 deletions

View File

@@ -44,7 +44,9 @@ struct TextBubbleItemView: View
let isFromMe: Bool
var body: some View {
let bubbleColor: Color = isFromMe ? .blue : Color(.systemGray)
let bubbleColor: Color = isFromMe ? .blue : Color(NSColor(name: "grayish", dynamicProvider: { appearance in
appearance.name == .darkAqua ? .darkGray : NSColor(white: 0.78, alpha: 1.0)
}))
let textColor: Color = isFromMe ? .white : .primary
BubbleView(isFromMe: isFromMe) {

View File

@@ -32,7 +32,9 @@ extension TranscriptView.ViewModel
}
}
displayItems.append(.message(message))
if !message.text.isEmpty {
displayItems.append(.message(message))
}
}
let animation: Animation? = animated ? .default : nil

View File

@@ -113,6 +113,7 @@ struct TranscriptView: View
Task { @MainActor [weak self] in
guard let self else { return }
await markAsRead()
await triggerSync()
setNeedsReload(animated: false)
@@ -121,6 +122,16 @@ struct TranscriptView: View
}
}
func markAsRead() async {
guard let displayedConversation else { return }
do {
try await client.markConversationAsRead(conversationId: displayedConversation)
} catch {
print("Error triggering sync: \(error)")
}
}
func triggerSync() async {
guard let displayedConversation else { return }