Pārlūkot izejas kodu

Some small fixes

humanlikedisaster 6 gadi atpakaļ
vecāks
revīzija
8e51d88795

+ 4 - 4
deltachat-ios/AppDelegate.swift

@@ -11,8 +11,8 @@ import AudioToolbox
 
 
 var mailboxPointer:UnsafeMutablePointer<dc_context_t>!
-let notificationChanged = Notification.Name(rawValue:"MrEventMsgsChanged")
-let notificationIncoming = Notification.Name(rawValue:"MrEventIncomingMsg")
+let dc_notificationChanged = Notification.Name(rawValue:"MrEventMsgsChanged")
+let dc_notificationIncoming = Notification.Name(rawValue:"MrEventIncomingMsg")
 
 @_silgen_name("callbackSwift")
 
@@ -81,7 +81,7 @@ public func callbackSwift(event: CInt, data1: CUnsignedLong, data2: CUnsignedLon
         let nc = NotificationCenter.default
         
         DispatchQueue.main.async {
-            nc.post(name:notificationChanged,
+            nc.post(name:dc_notificationChanged,
                     object: nil,
                     userInfo: ["message":"Messages Changed!", "date":Date()])
         }
@@ -91,7 +91,7 @@ public func callbackSwift(event: CInt, data1: CUnsignedLong, data2: CUnsignedLon
         // mrmailbox_get_fresh_msgs
         let nc = NotificationCenter.default
         DispatchQueue.main.async {
-            nc.post(name:notificationIncoming,
+            nc.post(name:dc_notificationIncoming,
                     object: nil,
                     userInfo: ["message":"Incoming Message!", "date":Date()])
         }

+ 2 - 2
deltachat-ios/ChatListController.swift

@@ -42,14 +42,14 @@ class ChatListController: UIViewController {
     override func viewDidAppear(_ animated: Bool) {
         super.viewDidAppear(animated)
         let nc = NotificationCenter.default
-        msgChangedObserver = nc.addObserver(forName:Notification.Name(rawValue:"MrEventMsgsChanged"),
+        msgChangedObserver = nc.addObserver(forName:dc_notificationChanged,
                                             object:nil, queue:nil) {
                                                 notification in
                                                 print("----------- MrEventMsgsChanged notification received --------")
                                                 self.getChatList()
         }
         
-        incomingMsgObserver = nc.addObserver(forName:Notification.Name(rawValue:"MrEventIncomingMsg"),
+        incomingMsgObserver = nc.addObserver(forName:dc_notificationIncoming,
                                              object:nil, queue:nil) {
                                                 notification in
                                                 print("----------- MrEventIncomingMsg received --------")

+ 2 - 2
deltachat-ios/ChatViewController.swift

@@ -63,7 +63,7 @@ class ChatViewController: MessagesViewController {
         super.viewWillAppear(animated)
         
         let nc = NotificationCenter.default
-        msgChangedObserver = nc.addObserver(forName:notificationChanged,
+        msgChangedObserver = nc.addObserver(forName:dc_notificationChanged,
                                             object:nil, queue: OperationQueue.main) {
                                                 notification in
                                                 print("----------- MrEventMsgsChanged notification received --------")
@@ -72,7 +72,7 @@ class ChatViewController: MessagesViewController {
                                                 self.messagesCollectionView.scrollToBottom()
         }
         
-        incomingMsgObserver = nc.addObserver(forName:notificationIncoming,
+        incomingMsgObserver = nc.addObserver(forName:dc_notificationIncoming,
                                              object:nil, queue: OperationQueue.main) {
                                                 notification in
                                                 print("----------- MrEventIncomingMsg received --------")