aboutsummaryrefslogtreecommitdiff
path: root/Hotline/Models
diff options
context:
space:
mode:
authorDustin Mierau <dustin@mierau.me>2024-05-08 20:53:10 -0700
committerDustin Mierau <dustin@mierau.me>2024-05-08 20:53:10 -0700
commit75b40db9adac93dde9df3ff76bb172c76e3d3a55 (patch)
tree1e9088849d7a32ac0f42c933e2b6ab50350ed196 /Hotline/Models
parent01d32910bc1e75533c2f473011296fee6febbadb (diff)
Fix about box layout on open. Remove about box from window menu, add expand button to server agreement, add email address highlighting, style server messages, unread badge on admins are red now, play server message sound, some code cleanup.
Diffstat (limited to 'Hotline/Models')
-rw-r--r--Hotline/Models/Hotline.swift7
1 files changed, 6 insertions, 1 deletions
diff --git a/Hotline/Models/Hotline.swift b/Hotline/Models/Hotline.swift
index d232533..598c787 100644
--- a/Hotline/Models/Hotline.swift
+++ b/Hotline/Models/Hotline.swift
@@ -723,7 +723,12 @@ class Hotline: Equatable, HotlineClientDelegate, HotlineFileClientDelegate {
print("Hotline: received private message from \(user.name): \(message)")
if Prefs.shared.playPrivateMessageSound && Prefs.shared.playPrivateMessageSound {
- SoundEffectPlayer.shared.playSoundEffect(.chatMessage)
+ if self.unreadInstantMessages[userID] == nil {
+ SoundEffectPlayer.shared.playSoundEffect(.serverMessage)
+ }
+ else {
+ SoundEffectPlayer.shared.playSoundEffect(.chatMessage)
+ }
}
let instantMessage = InstantMessage(direction: .incoming, text: message.convertingLinksToMarkdown(), type: .message, date: Date())