Refactoring

This commit is contained in:
Ali
2021-07-18 01:03:43 +02:00
parent 0bfe6e52b0
commit d4572a9248
85 changed files with 959 additions and 694 deletions

View File

@@ -287,7 +287,7 @@ open class TelegramBaseController: ViewController, KeyShortcutResponder {
let disposable = MetaDisposable()
callContextCache.impl.syncWith { impl in
let callContext = impl.get(account: context.account, peerId: peerId, call: activeCall)
let callContext = impl.get(account: context.account, engine: context.engine, peerId: peerId, call: activeCall)
disposable.set((callContext.context.panelData
|> deliverOnMainQueue).start(next: { panelData in
callContext.keep()
@@ -861,7 +861,7 @@ open class TelegramBaseController: ViewController, KeyShortcutResponder {
return transaction.getPeerCachedData(peerId: peerId)
}
let _ = (combineLatest(currentAccountPeer, cachedGroupCallDisplayAsAvailablePeers(account: context.account, peerId: peerId), cachedData)
let _ = (combineLatest(currentAccountPeer, context.engine.calls.cachedGroupCallDisplayAsAvailablePeers(peerId: peerId), cachedData)
|> map { currentAccountPeer, availablePeers, cachedData -> ([FoundPeer], CachedPeerData?) in
var result = currentAccountPeer
result.append(contentsOf: availablePeers)