mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Call improvements, use shared code
This commit is contained in:
@@ -210,7 +210,11 @@ final class CallControllerButtonsNode: ASDisplayNode {
|
||||
}
|
||||
topButtons.append(.enableCamera(isCameraActive))
|
||||
topButtons.append(.mute(self.isMuted))
|
||||
topButtons.append(.switchCamera)
|
||||
if case .possible = videoState {
|
||||
topButtons.append(.soundOutput(soundOutput))
|
||||
} else {
|
||||
topButtons.append(.switchCamera)
|
||||
}
|
||||
case .notAvailable:
|
||||
topButtons.append(.mute(self.isMuted))
|
||||
topButtons.append(.soundOutput(soundOutput))
|
||||
@@ -302,7 +306,7 @@ final class CallControllerButtonsNode: ASDisplayNode {
|
||||
|
||||
topButtons.append(.enableCamera(false))
|
||||
topButtons.append(.mute(self.isMuted))
|
||||
topButtons.append(.switchCamera)
|
||||
topButtons.append(.soundOutput(soundOutput))
|
||||
|
||||
let topButtonsContentWidth = CGFloat(topButtons.count) * smallButtonSize
|
||||
let topButtonsAvailableSpacingWidth = width - topButtonsContentWidth - minSmallButtonSideInset * 2.0
|
||||
|
||||
Reference in New Issue
Block a user