Explorar o código

filter DC_EVENT_CONNECTIVITY_CHANGED for the currently active account

cyberta %!s(int64=4) %!d(string=hai) anos
pai
achega
49896ea9d3
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      DcCore/DcCore/DC/events.swift

+ 3 - 0
DcCore/DcCore/DC/events.swift

@@ -227,6 +227,9 @@ public class DcEventHandler {
             }
 
         case DC_EVENT_CONNECTIVITY_CHANGED:
+            if dcContext.id != dcAccounts.getSelected().id {
+                return
+            }
             dcContext.logger?.info("network: DC_EVENT_CONNECTIVITY_CHANGED: \(dcContext.getConnectivity())")
             DispatchQueue.main.async {
                 let nc = NotificationCenter.default