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
|
|> mapToSignal { result -> Signal<([Peer], Int), NoError> in
|
||||||
let chats: [Api.Chat]
|
let chats: [Api.Chat]
|
||||||
let count: Int?
|
let count: Int?
|
||||||
switch result {
|
if let result = result {
|
||||||
case .none:
|
switch result {
|
||||||
|
case let .chats(apiChats):
|
||||||
|
chats = apiChats
|
||||||
|
count = nil
|
||||||
|
case let .chatsSlice(apiCount, apiChats):
|
||||||
|
chats = apiChats
|
||||||
|
count = Int(apiCount)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
chats = []
|
chats = []
|
||||||
count = nil
|
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
|
return postbox.transaction { transaction -> ([Peer], Int) in
|
||||||
var peers: [Peer] = []
|
var peers: [Peer] = []
|
||||||
for chat in chats {
|
for chat in chats {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user