mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-01-05 20:52:48 +00:00
Merge commit 'dd7e404f6e4c9db570def4fcba625519c2abe848'
This commit is contained in:
@@ -84,7 +84,7 @@ private final class WrappedLegacyReachability: NSObject {
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOSApplicationExtension 12.0, iOS 12.0, *)
|
||||
@available(iOSApplicationExtension 12.0, iOS 12.0, OSX 10.14, *)
|
||||
private final class PathMonitor {
|
||||
private let queue: Queue
|
||||
private let monitor: NWPathMonitor
|
||||
@@ -133,7 +133,7 @@ private final class PathMonitor {
|
||||
}
|
||||
}
|
||||
|
||||
@available(iOSApplicationExtension 12.0, iOS 12.0, *)
|
||||
@available(iOSApplicationExtension 12.0, iOS 12.0, OSX 10.14, *)
|
||||
private final class SharedPathMonitor {
|
||||
static let queue = Queue()
|
||||
static let impl = QueueLocalObject<PathMonitor>(queue: queue, generate: {
|
||||
@@ -149,7 +149,7 @@ public enum Reachability {
|
||||
}
|
||||
|
||||
public static var networkType: Signal<NetworkType, NoError> {
|
||||
if #available(iOSApplicationExtension 12.0, iOS 12.0, *) {
|
||||
if #available(iOSApplicationExtension 12.0, iOS 12.0, OSX 10.14, *) {
|
||||
return Signal { subscriber in
|
||||
let disposable = MetaDisposable()
|
||||
|
||||
|
||||
@@ -71,6 +71,9 @@ func parseTelegramGroupOrChannel(chat: Api.Chat) -> Peer? {
|
||||
var infoFlags = TelegramChannelGroupFlags()
|
||||
if (flags & Int32(1 << 22)) != 0 {
|
||||
infoFlags.insert(.slowModeEnabled)
|
||||
} else if id == 1061639060 {
|
||||
var bp:Int = 0
|
||||
bp += 1
|
||||
}
|
||||
info = .group(TelegramChannelGroupInfo(flags: infoFlags))
|
||||
} else {
|
||||
@@ -165,7 +168,10 @@ func mergeGroupOrChannel(lhs: Peer?, rhs: Api.Chat) -> Peer? {
|
||||
case .broadcast:
|
||||
break
|
||||
case .group:
|
||||
let infoFlags = TelegramChannelGroupFlags()
|
||||
var infoFlags = TelegramChannelGroupFlags()
|
||||
if (flags & Int32(1 << 22)) != 0 {
|
||||
infoFlags.insert(.slowModeEnabled)
|
||||
}
|
||||
info = .group(TelegramChannelGroupInfo(flags: infoFlags))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user