mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Various improvements
This commit is contained in:
parent
bebbd02f30
commit
72fbe5d7a7
25 changed files with 430 additions and 231 deletions
|
|
@ -213,6 +213,10 @@ final class VideoChatParticipantVideoComponent: Component {
|
|||
private var referenceLocation: ReferenceLocation?
|
||||
private var loadingEffectView: VideoChatVideoLoadingEffectView?
|
||||
|
||||
public var isPinchToZoomActive: Bool {
|
||||
return self.pinchContainerNode.isActive
|
||||
}
|
||||
|
||||
override init(frame: CGRect) {
|
||||
self.backgroundGradientView = UIImageView()
|
||||
self.pinchContainerNode = PinchSourceContainerNode()
|
||||
|
|
|
|||
|
|
@ -693,7 +693,7 @@ final class VideoChatParticipantsComponent: Component {
|
|||
|
||||
private var appliedGridIsEmpty: Bool = true
|
||||
|
||||
private var isPinchToZoomActive: Bool = false
|
||||
private(set) var isPinchToZoomActive: Bool = false
|
||||
|
||||
private var stopRequestingNonCentralVideo: Bool = false
|
||||
private var stopRequestingNonCentralVideoTimer: Foundation.Timer?
|
||||
|
|
|
|||
|
|
@ -337,6 +337,13 @@ final class VideoChatScreenComponent: Component {
|
|||
|
||||
var maxVideoQuality: Int = Int.max
|
||||
|
||||
private var isPinchToZoomActive: Bool {
|
||||
if let participantsView = self.participants.view as? VideoChatParticipantsComponent.View {
|
||||
return participantsView.isPinchToZoomActive
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
override init(frame: CGRect) {
|
||||
self.containerView = UIView()
|
||||
self.containerView.clipsToBounds = true
|
||||
|
|
@ -1609,7 +1616,7 @@ final class VideoChatScreenComponent: Component {
|
|||
}
|
||||
|
||||
if let expandedParticipantsVideoState = self.expandedParticipantsVideoState, let members {
|
||||
if CFAbsoluteTimeGetCurrent() > self.focusedSpeakerAutoSwitchDeadline, !expandedParticipantsVideoState.isMainParticipantPinned, let participant = members.participants.first(where: { participant in
|
||||
if CFAbsoluteTimeGetCurrent() > self.focusedSpeakerAutoSwitchDeadline, !expandedParticipantsVideoState.isMainParticipantPinned, !self.isPinchToZoomActive, let participant = members.participants.first(where: { participant in
|
||||
if let callState = self.callState, participant.id == .peer(callState.myPeerId) {
|
||||
return false
|
||||
}
|
||||
|
|
@ -1966,7 +1973,7 @@ final class VideoChatScreenComponent: Component {
|
|||
}
|
||||
|
||||
if let expandedParticipantsVideoState = self.expandedParticipantsVideoState {
|
||||
if CFAbsoluteTimeGetCurrent() > self.focusedSpeakerAutoSwitchDeadline, !expandedParticipantsVideoState.isMainParticipantPinned, let participant = members.participants.first(where: { participant in
|
||||
if CFAbsoluteTimeGetCurrent() > self.focusedSpeakerAutoSwitchDeadline, !expandedParticipantsVideoState.isMainParticipantPinned, !self.isPinchToZoomActive, let participant = members.participants.first(where: { participant in
|
||||
if let callState = self.callState, participant.id == .peer(callState.myPeerId) {
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,11 +121,10 @@ private final class VoiceChatShareScreenContextItemNode: ASDisplayNode, ContextM
|
|||
let standardIconWidth: CGFloat = 32.0
|
||||
var rightTextInset: CGFloat = sideInset
|
||||
if !iconSize.width.isZero {
|
||||
rightTextInset = max(iconSize.width, standardIconWidth) + iconSideInset + sideInset
|
||||
rightTextInset = max(iconSize.width, standardIconWidth) + iconSideInset
|
||||
}
|
||||
|
||||
let textSize = self.textNode.updateLayout(CGSize(width: constrainedWidth - sideInset - rightTextInset, height: .greatestFiniteMagnitude))
|
||||
|
||||
|
||||
let verticalSpacing: CGFloat = 2.0
|
||||
let combinedTextHeight = textSize.height + verticalSpacing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue