瀏覽代碼

terminate xdc on sending and call RelayHelper

B. Petersen 2 年之前
父節點
當前提交
adc4fb853a
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      deltachat-ios/Controller/WebxdcViewController.swift

+ 2 - 1
deltachat-ios/Controller/WebxdcViewController.swift

@@ -360,7 +360,8 @@ extension WebxdcViewController: WKScriptMessageHandler {
 
         case .sendToChat:
             logger.debug("send to chat: \(message.body)")
-            // TODO: pass file and thext to share forward handler so that it results in a draft; exit the xdc
+            RelayHelper.shared.setForwardMessage(messageId: messageId) // TOOD: set message.* as data to the RelayHelper, make RelayHelper produce a draft
+            navigationController?.popViewControllers(viewsToPop: 2, animated: true) // TODO: xdc may be in profile, all media, whatnot, just popping 2 is wrong
 
         default:
             logger.debug("another method was called")