From 0e63dd2b30f6ec32e438ea19525643617f12e15d Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Thu, 16 Jan 2025 18:01:38 +0100 Subject: [PATCH] adapt to new save_msgs() api --- deltachat-ios/Chat/ChatViewController.swift | 2 +- deltachat-ios/DC/DcContext.swift | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/deltachat-ios/Chat/ChatViewController.swift b/deltachat-ios/Chat/ChatViewController.swift index 8628ad862..ffe25a968 100644 --- a/deltachat-ios/Chat/ChatViewController.swift +++ b/deltachat-ios/Chat/ChatViewController.swift @@ -1743,7 +1743,7 @@ class ChatViewController: UITableViewController, UITableViewDropDelegate { } else if message.savedMessageId != 0 { dcContext.deleteMessage(msgId: message.savedMessageId) } else { - dcContext.forwardMessage(with: messageIds[indexPath.row], to: dcContext.getChatIdByContactId(contactId: Int(DC_CONTACT_ID_SELF))) + dcContext.saveMessages(with: [messageIds[indexPath.row]]) } } diff --git a/deltachat-ios/DC/DcContext.swift b/deltachat-ios/DC/DcContext.swift index dcb090f95..850118bfd 100644 --- a/deltachat-ios/DC/DcContext.swift +++ b/deltachat-ios/DC/DcContext.swift @@ -473,6 +473,10 @@ public class DcContext { dc_forward_msgs(contextPointer, msgIds.compactMap { UInt32($0) }, Int32(msgIds.count), UInt32(chat)) } + public func saveMessages(with msgIds: [Int]) { + dc_save_msgs(contextPointer, msgIds.compactMap { UInt32($0) }, Int32(msgIds.count)) + } + public func sendTextInChat(id: Int, message: String) { dc_send_text_msg(contextPointer, UInt32(id), message) }