Selaa lähdekoodia

no need to pass the DC_GCM_ADDDAYMARKER flag from outside of DcCore for now

cyberta 4 vuotta sitten
vanhempi
commit
eafd127c31
2 muutettua tiedostoa jossa 5 lisäystä ja 5 poistoa
  1. 4 4
      DcCore/DcCore/DC/Wrapper.swift
  2. 1 1
      deltachat-ios/Chat/ChatViewController.swift

+ 4 - 4
DcCore/DcCore/DC/Wrapper.swift

@@ -27,9 +27,9 @@ public class DcContext {
         return .dcContext
     }
 
-    public func getMessageIds(chatId: Int, count: Int? = nil, from: Int? = nil, flags: Int32 = 0) -> [Int] {
+    public func getMessageIds(chatId: Int, count: Int? = nil, from: Int? = nil) -> [Int] {
         let start = CFAbsoluteTimeGetCurrent()
-        let cMessageIds = getChatMessages(chatId: chatId, flags: flags)
+        let cMessageIds = getChatMessages(chatId: chatId)
         let diff = CFAbsoluteTimeGetCurrent() - start
         logger?.info("⏰ getMessageIds: \(diff) s")
 
@@ -255,8 +255,8 @@ public class DcContext {
         }
     }
 
-    private func getChatMessages(chatId: Int, flags: Int32) -> OpaquePointer {
-        return dc_get_chat_msgs(contextPointer, UInt32(chatId), UInt32(flags), 0)
+    private func getChatMessages(chatId: Int) -> OpaquePointer {
+        return dc_get_chat_msgs(contextPointer, UInt32(chatId), UInt32(DC_GCM_ADDDAYMARKER), 0)
     }
     
     public func getMsgInfo(msgId: Int) -> String {

+ 1 - 1
deltachat-ios/Chat/ChatViewController.swift

@@ -798,7 +798,7 @@ class ChatViewController: UITableViewController {
     }
     
     private func getMessageIds() -> [Int] {
-        return dcContext.getMessageIds(chatId: chatId, flags: DC_GCM_ADDDAYMARKER)
+        return dcContext.getMessageIds(chatId: chatId)
     }
 
     @objc private func saveDraft() {