Explorar el Código

filter DC_EVENT_CONNECTIVITY_CHANGED for the currently active account

cyberta hace 4 años
padre
commit
49896ea9d3
Se han modificado 1 ficheros con 3 adiciones y 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