mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-05 05:51:42 +00:00
Merge commit '44060eaaf9c7e4c8b679a555255956d24bed9784'
This commit is contained in:
commit
af52184c6c
@ -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