Fix message deletion

pull/46/head
Niels Andriesse 6 years ago
parent 85fe0504b2
commit 462c61d38f

@ -42,7 +42,7 @@ struct MessageActionBuilder {
static func deleteMessage(conversationViewItem: ConversationViewItem, delegate: MessageActionsDelegate) -> MenuAction {
return MenuAction(image: #imageLiteral(resourceName: "ic_trash"),
title: NSLocalizedString("MESSAGE_ACTION_DELETE_MESSAGE", comment: "Action sheet button title"),
subtitle: NSLocalizedString("MESSAGE_ACTION_DELETE_MESSAGE_SUBTITLE", comment: "Action sheet button subtitle"),
subtitle: nil,
block: { (_) in
conversationViewItem.deleteAction()
})

@ -1186,7 +1186,7 @@ NSString *NSStringForOWSMessageCellType(OWSMessageCellType cellType)
// Delete the message
BOOL isSentByUser = (interationType == OWSInteractionType_OutgoingMessage);
[[LKGroupChatAPI deleteMessageWithID:message.isGroupChatMessage forGroup:LKGroupChatAPI.publicChatServerID onServer:LKGroupChatAPI.publicChatServer isSentByUser:isSentByUser].catch(^(NSError *error) {
[[LKGroupChatAPI deleteMessageWithID:message.groupChatMessageID forGroup:LKGroupChatAPI.publicChatServerID onServer:LKGroupChatAPI.publicChatServer isSentByUser:isSentByUser].catch(^(NSError *error) {
// Roll back
[self.interaction save];
}) retainUntilComplete];

Loading…
Cancel
Save