mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
fix reachability [skip ci]
This commit is contained in:
parent
b740522e3c
commit
6b36b77d87
1 changed files with 3 additions and 3 deletions
|
|
@ -12,7 +12,7 @@ private final class WrappedLegacyReachability: NSObject {
|
|||
}
|
||||
|
||||
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()
|
||||
return thread
|
||||
}()
|
||||
|
|
@ -152,13 +152,13 @@ public enum Reachability {
|
|||
if #available(iOSApplicationExtension 12.0, iOS 12.0, OSX 10.14, *) {
|
||||
return Signal { subscriber in
|
||||
let disposable = MetaDisposable()
|
||||
|
||||
|
||||
SharedPathMonitor.impl.with { impl in
|
||||
disposable.set(impl.networkType.get().start(next: { value in
|
||||
subscriber.putNext(value)
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
return disposable
|
||||
}
|
||||
|> distinctUntilChanged
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue