浏览代码

add helper method to get blockedContactIds

cyberta 5 年之前
父节点
当前提交
e8f031fcf3
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      deltachat-ios/Helper/Utils.swift

+ 5 - 0
deltachat-ios/Helper/Utils.swift

@@ -8,6 +8,11 @@ struct Utils {
         return Utils.copyAndFreeArray(inputArray: cContacts)
     }
 
+    static func getBlockedContactIds() -> [Int] {
+        let cBlockedContacts = dc_get_blocked_contacts(mailboxPointer)
+        return Utils.copyAndFreeArray(inputArray: cBlockedContacts)
+    }
+
     static func getInitials(inputName: String) -> String {
         var nameParts = inputName.split(separator: " ")
         // this limits initials to max 2, otherwise just takes first letter to avoid messy badges