Browse Source

add helper method to get blockedContactIds

cyberta 5 years ago
parent
commit
e8f031fcf3
1 changed files with 5 additions and 0 deletions
  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)
         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 {
     static func getInitials(inputName: String) -> String {
         var nameParts = inputName.split(separator: " ")
         var nameParts = inputName.split(separator: " ")
         // this limits initials to max 2, otherwise just takes first letter to avoid messy badges
         // this limits initials to max 2, otherwise just takes first letter to avoid messy badges