aboutsummaryrefslogtreecommitdiff
path: root/Hotline/macOS/MessageView.swift
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2025-11-14 16:02:56 -0800
committerDustin Mierau <dustin@mierau.me>2025-11-14 16:02:56 -0800
commita1ec37248ce36e84cbdb896e226f241f39df8292 (patch)
treead84aba4918fafeb75e4fa761dc97a380760d626 /Hotline/macOS/MessageView.swift
parentda1d7001f5132115bfdbe19cd95e73b04ba76c95 (diff)
Bit more work on error handling.
Diffstat (limited to 'Hotline/macOS/MessageView.swift')
-rw-r--r--Hotline/macOS/MessageView.swift8
1 files changed, 7 insertions, 1 deletions
diff --git a/Hotline/macOS/MessageView.swift b/Hotline/macOS/MessageView.swift
index 6208d54..858aa37 100644
--- a/Hotline/macOS/MessageView.swift
+++ b/Hotline/macOS/MessageView.swift
@@ -30,9 +30,15 @@ struct MessageView: View {
}
.background(Color(nsColor: .textBackgroundColor))
.onAppear {
- let user = self.model.users.first(where: { $0.id == userID })
+ self.model.markInstantMessagesAsRead(userID: self.userID)
+
+ let user = self.model.users.first(where: { $0.id == self.userID })
self.username = user?.name
}
+
+ .onAppear {
+ self.model.markInstantMessagesAsRead(userID: userID)
+ }
.toolbar {
if self.model.access?.contains(.canGetClientInfo) == true {
ToolbarItem {