mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Merge branch 'master' of gitlab.com:peter-iakovlev/telegram-ios
This commit is contained in:
commit
9367fa95d7
@ -209,13 +209,49 @@ public final class CallListController: TelegramBaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func createGroupCall() {
|
private func createGroupCall() {
|
||||||
|
self.view.endEditing(true)
|
||||||
|
|
||||||
guard !self.presentAccountFrozenInfoIfNeeded() else {
|
guard !self.presentAccountFrozenInfoIfNeeded() else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if self.createConferenceCallDisposable != nil {
|
if self.createConferenceCallDisposable != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
self.createConferenceCallDisposable = (self.context.engine.calls.createConferenceCall()
|
|
||||||
|
var cancelImpl: (() -> Void)?
|
||||||
|
var signal = self.context.engine.calls.createConferenceCall()
|
||||||
|
let presentationData = self.context.sharedContext.currentPresentationData.with { $0 }
|
||||||
|
let progressSignal = Signal<Never, NoError> { [weak self] subscriber in
|
||||||
|
let controller = OverlayStatusController(theme: presentationData.theme, type: .loading(cancelled: {
|
||||||
|
cancelImpl?()
|
||||||
|
}))
|
||||||
|
self?.present(controller, in: .window(.root), with: ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
|
||||||
|
return ActionDisposable { [weak controller] in
|
||||||
|
Queue.mainQueue().async() {
|
||||||
|
controller?.dismiss()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|> runOn(Queue.mainQueue())
|
||||||
|
|> delay(0.3, queue: Queue.mainQueue())
|
||||||
|
let progressDisposable = progressSignal.start()
|
||||||
|
|
||||||
|
signal = signal
|
||||||
|
|> afterDisposed {
|
||||||
|
Queue.mainQueue().async {
|
||||||
|
progressDisposable.dispose()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cancelImpl = { [weak self] in
|
||||||
|
guard let self else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
self.createConferenceCallDisposable?.dispose()
|
||||||
|
self.createConferenceCallDisposable = nil
|
||||||
|
}
|
||||||
|
|
||||||
|
self.createConferenceCallDisposable?.dispose()
|
||||||
|
self.createConferenceCallDisposable = (signal
|
||||||
|> deliverOnMainQueue).startStrict(next: { [weak self] call in
|
|> deliverOnMainQueue).startStrict(next: { [weak self] call in
|
||||||
guard let self else {
|
guard let self else {
|
||||||
return
|
return
|
||||||
|
@ -2117,11 +2117,6 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var prioritizeVP8 = false
|
var prioritizeVP8 = false
|
||||||
#if DEBUG
|
|
||||||
if "".isEmpty {
|
|
||||||
prioritizeVP8 = true
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
if let data = self.accountContext.currentAppConfiguration.with({ $0 }).data, let value = data["ios_calls_prioritize_vp8"] as? Double {
|
if let data = self.accountContext.currentAppConfiguration.with({ $0 }).data, let value = data["ios_calls_prioritize_vp8"] as? Double {
|
||||||
prioritizeVP8 = value != 0.0
|
prioritizeVP8 = value != 0.0
|
||||||
}
|
}
|
||||||
|
@ -2429,16 +2429,24 @@ final class VideoChatScreenComponent: Component {
|
|||||||
var encryptionKeyTransition = transition
|
var encryptionKeyTransition = transition
|
||||||
if encryptionKeyView.superview == nil {
|
if encryptionKeyView.superview == nil {
|
||||||
encryptionKeyTransition = encryptionKeyTransition.withAnimation(.none)
|
encryptionKeyTransition = encryptionKeyTransition.withAnimation(.none)
|
||||||
|
|
||||||
|
if let participantsView = self.participants.view as? VideoChatParticipantsComponent.View {
|
||||||
|
self.containerView.insertSubview(encryptionKeyView, belowSubview: participantsView)
|
||||||
|
} else {
|
||||||
self.containerView.addSubview(encryptionKeyView)
|
self.containerView.addSubview(encryptionKeyView)
|
||||||
|
}
|
||||||
|
|
||||||
ComponentTransition.immediate.setScale(view: encryptionKeyView, scale: 0.001)
|
ComponentTransition.immediate.setScale(view: encryptionKeyView, scale: 0.001)
|
||||||
encryptionKeyView.alpha = 0.0
|
encryptionKeyView.alpha = 0.0
|
||||||
}
|
}
|
||||||
|
|
||||||
encryptionKeyTransition.setPosition(view: encryptionKeyView, position: encryptionKeyFrame.center)
|
encryptionKeyTransition.setPosition(view: encryptionKeyView, position: encryptionKeyFrame.center)
|
||||||
encryptionKeyTransition.setBounds(view: encryptionKeyView, bounds: CGRect(origin: CGPoint(), size: encryptionKeyFrame.size))
|
encryptionKeyTransition.setBounds(view: encryptionKeyView, bounds: CGRect(origin: CGPoint(), size: encryptionKeyFrame.size))
|
||||||
transition.setScale(view: encryptionKeyView, scale: 1.0)
|
transition.setScale(view: encryptionKeyView, scale: 1.0)
|
||||||
alphaTransition.setAlpha(view: encryptionKeyView, alpha: self.isAnimatedOutFromPrivateCall ? 0.0 : 1.0)
|
alphaTransition.setAlpha(view: encryptionKeyView, alpha: self.isAnimatedOutFromPrivateCall ? 0.0 : 1.0)
|
||||||
|
|
||||||
|
transition.setZPosition(layer: encryptionKeyView.layer, zPosition: self.isEncryptionKeyExpanded ? 1.0 : 0.0)
|
||||||
|
|
||||||
if self.isEncryptionKeyExpanded {
|
if self.isEncryptionKeyExpanded {
|
||||||
let encryptionKeyBackground: ComponentView<Empty>
|
let encryptionKeyBackground: ComponentView<Empty>
|
||||||
var encryptionKeyBackgroundTransition = transition
|
var encryptionKeyBackgroundTransition = transition
|
||||||
@ -2464,12 +2472,14 @@ final class VideoChatScreenComponent: Component {
|
|||||||
self.containerView.insertSubview(encryptionKeyBackgroundView, belowSubview: encryptionKeyView)
|
self.containerView.insertSubview(encryptionKeyBackgroundView, belowSubview: encryptionKeyView)
|
||||||
encryptionKeyBackgroundView.alpha = 0.0
|
encryptionKeyBackgroundView.alpha = 0.0
|
||||||
}
|
}
|
||||||
|
encryptionKeyBackgroundView.layer.zPosition = 0.9
|
||||||
alphaTransition.setAlpha(view: encryptionKeyBackgroundView, alpha: 1.0)
|
alphaTransition.setAlpha(view: encryptionKeyBackgroundView, alpha: 1.0)
|
||||||
encryptionKeyBackgroundTransition.setFrame(view: encryptionKeyBackgroundView, frame: CGRect(origin: CGPoint(), size: availableSize))
|
encryptionKeyBackgroundTransition.setFrame(view: encryptionKeyBackgroundView, frame: CGRect(origin: CGPoint(), size: availableSize))
|
||||||
}
|
}
|
||||||
} else if let encryptionKeyBackground = self.encryptionKeyBackground {
|
} else if let encryptionKeyBackground = self.encryptionKeyBackground {
|
||||||
self.encryptionKeyBackground = nil
|
self.encryptionKeyBackground = nil
|
||||||
if let encryptionKeyBackgroundView = encryptionKeyBackground.view {
|
if let encryptionKeyBackgroundView = encryptionKeyBackground.view {
|
||||||
|
transition.setZPosition(layer: encryptionKeyBackgroundView.layer, zPosition: 0.0)
|
||||||
alphaTransition.setAlpha(view: encryptionKeyBackgroundView, alpha: 0.0, completion: { [weak encryptionKeyBackgroundView] _ in
|
alphaTransition.setAlpha(view: encryptionKeyBackgroundView, alpha: 0.0, completion: { [weak encryptionKeyBackgroundView] _ in
|
||||||
encryptionKeyBackgroundView?.removeFromSuperview()
|
encryptionKeyBackgroundView?.removeFromSuperview()
|
||||||
})
|
})
|
||||||
|
@ -474,6 +474,9 @@ public final class ChatMessageWebpageBubbleContentNode: ChatMessageBubbleContent
|
|||||||
actionTitle = item.presentationData.strings.Conversation_ViewStarGift
|
actionTitle = item.presentationData.strings.Conversation_ViewStarGift
|
||||||
text = nil
|
text = nil
|
||||||
entities = nil
|
entities = nil
|
||||||
|
case "telegram_call":
|
||||||
|
//TODO:localize
|
||||||
|
actionTitle = "JOIN GROUP CALL"
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user