diff --git a/MC1/Views/Contacts/ContactContextMenuModifier.swift b/MC1/Views/Contacts/ContactContextMenuModifier.swift index 24f01765..1995b462 100644 --- a/MC1/Views/Contacts/ContactContextMenuModifier.swift +++ b/MC1/Views/Contacts/ContactContextMenuModifier.swift @@ -1,9 +1,9 @@ import MC1Services import SwiftUI -/// Long-press context-menu actions for a node row: delete, block/unblock, favorite/unfavorite, -/// matching the conversation list. Delete is gated while a removal is in flight so a rapid re-press -/// can't double-fire. +/// Long-press context-menu actions for a node row: send message (chat contacts only), delete, +/// block/unblock, favorite/unfavorite, matching the conversation list. Delete is gated while a +/// removal is in flight so a rapid re-press can't double-fire. struct ContactContextMenuModifier: ViewModifier { @Environment(\.appState) private var appState @@ -22,6 +22,15 @@ struct ContactContextMenuModifier: ViewModifier { func body(content: Content) -> some View { content.contextMenu { + if contact.type == .chat, !contact.isBlocked { + Button { + appState.navigation.navigateToChat(with: contact) + } label: { + Label(L10n.Contacts.Contacts.Detail.sendMessage, systemImage: "message.fill") + } + .disabled(!isConnected) + } + if !isVContact { Button(role: .destructive) { Task {