mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
swift 5 -> 4 [ski ci]
This commit is contained in:
parent
746bea9782
commit
a94999934b
@ -66,18 +66,21 @@ private final class GroupsInCommonContextImpl {
|
||||
|> mapToSignal { result -> Signal<([Peer], Int), NoError> in
|
||||
let chats: [Api.Chat]
|
||||
let count: Int?
|
||||
switch result {
|
||||
case .none:
|
||||
if let result = result {
|
||||
switch result {
|
||||
case let .chats(apiChats):
|
||||
chats = apiChats
|
||||
count = nil
|
||||
case let .chatsSlice(apiCount, apiChats):
|
||||
chats = apiChats
|
||||
count = Int(apiCount)
|
||||
}
|
||||
} else {
|
||||
chats = []
|
||||
count = nil
|
||||
case let .chats(apiChats):
|
||||
chats = apiChats
|
||||
count = nil
|
||||
case let .chatsSlice(apiCount, apiChats):
|
||||
chats = apiChats
|
||||
count = Int(apiCount)
|
||||
}
|
||||
|
||||
|
||||
return postbox.transaction { transaction -> ([Peer], Int) in
|
||||
var peers: [Peer] = []
|
||||
for chat in chats {
|
||||
|
Loading…
x
Reference in New Issue
Block a user