Various improvements

This commit is contained in:
Isaac 2026-03-13 14:54:44 +01:00
parent bebbd02f30
commit 72fbe5d7a7
25 changed files with 430 additions and 231 deletions

View file

@ -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()

View file

@ -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?

View file

@ -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
}

View file

@ -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