소스 검색

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