mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
hide delete for everyone if there is no server hash for the message
This commit is contained in:
parent
050a2ec534
commit
1450fd380b
1 changed files with 7 additions and 2 deletions
|
@ -67,8 +67,13 @@ extension ContextMenuVC {
|
|||
|
||||
static func deleteActions(for viewItem: ConversationViewItem, delegate: ContextMenuActionDelegate?) -> [Action] {
|
||||
switch viewItem.interaction.interactionType() {
|
||||
case .outgoingMessage: return [Action.deleteForEveryone(viewItem, delegate), Action.deleteLocally(viewItem, delegate)]
|
||||
case .incomingMessage: return [Action.deleteLocally(viewItem, delegate)]
|
||||
case .outgoingMessage:
|
||||
if let message = viewItem.interaction as? TSMessage, let _ = message.serverHash {
|
||||
return [Action.deleteForEveryone(viewItem, delegate), Action.deleteLocally(viewItem, delegate)]
|
||||
}
|
||||
return [Action.deleteLocally(viewItem, delegate)]
|
||||
case .incomingMessage:
|
||||
return [Action.deleteLocally(viewItem, delegate)]
|
||||
default: return [] // Should never occur
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue