mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 01:10:09 +00:00
fix reachability [skip ci]
This commit is contained in:
parent
b740522e3c
commit
6b36b77d87
@ -12,7 +12,7 @@ private final class WrappedLegacyReachability: NSObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static let thread: Thread = {
|
private static let thread: Thread = {
|
||||||
let thread = Thread(target: Reachability.self, selector: #selector(WrappedLegacyReachability.threadImpl), object: nil)
|
let thread = Thread(target: WrappedLegacyReachability.self, selector: #selector(WrappedLegacyReachability.threadImpl), object: nil)
|
||||||
thread.start()
|
thread.start()
|
||||||
return thread
|
return thread
|
||||||
}()
|
}()
|
||||||
@ -152,13 +152,13 @@ public enum Reachability {
|
|||||||
if #available(iOSApplicationExtension 12.0, iOS 12.0, OSX 10.14, *) {
|
if #available(iOSApplicationExtension 12.0, iOS 12.0, OSX 10.14, *) {
|
||||||
return Signal { subscriber in
|
return Signal { subscriber in
|
||||||
let disposable = MetaDisposable()
|
let disposable = MetaDisposable()
|
||||||
|
|
||||||
SharedPathMonitor.impl.with { impl in
|
SharedPathMonitor.impl.with { impl in
|
||||||
disposable.set(impl.networkType.get().start(next: { value in
|
disposable.set(impl.networkType.get().start(next: { value in
|
||||||
subscriber.putNext(value)
|
subscriber.putNext(value)
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
return disposable
|
return disposable
|
||||||
}
|
}
|
||||||
|> distinctUntilChanged
|
|> distinctUntilChanged
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user