Browse Source

show message info

B. Petersen 6 năm trước cách đây
mục cha
commit
2608148dd1

+ 1 - 1
deltachat-ios/Controller/MessageInfoViewController.swift

@@ -41,7 +41,7 @@ class MessageInfoViewController: UITableViewController {
             if indexPath.row == 0 {
                 cell.textLabel?.numberOfLines = 0
                 cell.textLabel?.lineBreakMode = .byWordWrapping
-                cell.textLabel?.text = message.text
+                cell.textLabel?.text = dcContext.getMsgInfo(msgId: message.id)
             }
         }
 

+ 7 - 0
deltachat-ios/DC/Wrapper.swift

@@ -128,6 +128,13 @@ class DcContext {
         dc_stop_ongoing_process(contextPointer)
     }
 
+    func getMsgInfo(msgId: Int) -> String {
+        if let cString = dc_get_msg_info(self.contextPointer, UInt32(msgId)) {
+            return String(cString: cString)
+        }
+        return "ErrGetMsgInfo"
+    }
+
 }
 
 class DcLot {