Fix message deletion

This commit is contained in:
Niels Andriesse 2019-09-02 14:39:02 +10:00
parent 85fe0504b2
commit 462c61d38f
2 changed files with 2 additions and 2 deletions

View File

@ -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()
})

View File

@ -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];