Selaa lähdekoodia

filter DC_EVENT_CONNECTIVITY_CHANGED for the currently active account

cyberta 4 vuotta sitten
vanhempi
commit
49896ea9d3
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  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