Fix joining to voice chats of legacy groups from Calls screen

Add account selection when joining voice chats from Calls screen
This commit is contained in:
Ilya Laktyushin
2021-03-17 14:59:51 +04:00
parent 745c6e81a5
commit efaffc6459
4 changed files with 27 additions and 10 deletions

View File

@@ -14,6 +14,7 @@ import AlertUI
import AppBundle
import LocalizedPeerData
import ContextUI
import TelegramBaseController
public enum CallListControllerMode {
case tab
@@ -65,7 +66,7 @@ private final class DeleteAllButtonNode: ASDisplayNode {
}
}
public final class CallListController: ViewController {
public final class CallListController: TelegramBaseController {
private var controllerNode: CallListControllerNode {
return self.displayNode as! CallListControllerNode
}
@@ -98,7 +99,7 @@ public final class CallListController: ViewController {
self.segmentedTitleView = ItemListControllerSegmentedTitleView(theme: self.presentationData.theme, segments: [self.presentationData.strings.Calls_All, self.presentationData.strings.Calls_Missed], selectedIndex: 0)
super.init(navigationBarPresentationData: NavigationBarPresentationData(presentationData: self.presentationData))
super.init(context: context, navigationBarPresentationData: NavigationBarPresentationData(presentationData: self.presentationData), mediaAccessoryPanelVisibility: .none, locationBroadcastPanelSource: .none, groupCallPanelSource: .none)
self.statusBar.statusBarStyle = self.presentationData.theme.rootController.statusBarStyle.style
@@ -199,6 +200,10 @@ public final class CallListController: ViewController {
if let strongSelf = self {
strongSelf.call(peerId, isVideo: isVideo)
}
}, joinGroupCall: { [weak self] peerId, activeCall in
if let strongSelf = self {
strongSelf.joinGroupCall(peerId: peerId, invite: nil, activeCall: activeCall)
}
}, openInfo: { [weak self] peerId, messages in
if let strongSelf = self {
let _ = (strongSelf.context.account.postbox.loadedPeerWithId(peerId)