mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Video Chat Improvements
This commit is contained in:
@@ -133,6 +133,8 @@ private class VoiceChatCameraPreviewControllerNode: ViewControllerTracingNode, U
|
||||
|
||||
private var applicationStateDisposable: Disposable?
|
||||
|
||||
private let hapticFeedback = HapticFeedback()
|
||||
|
||||
var shareCamera: ((Bool) -> Void)?
|
||||
var switchCamera: (() -> Void)?
|
||||
var dismiss: (() -> Void)?
|
||||
@@ -298,11 +300,13 @@ private class VoiceChatCameraPreviewControllerNode: ViewControllerTracingNode, U
|
||||
}
|
||||
|
||||
@objc private func microphonePressed() {
|
||||
self.hapticFeedback.impact(.light)
|
||||
self.microphoneButton.isSelected = !self.microphoneButton.isSelected
|
||||
self.microphoneIconNode.update(state: .init(muted: !self.microphoneButton.isSelected, filled: true, color: .white), animated: true)
|
||||
}
|
||||
|
||||
@objc private func switchCameraPressed() {
|
||||
self.hapticFeedback.impact(.light)
|
||||
self.switchCamera?()
|
||||
|
||||
let springDuration: Double = 0.7
|
||||
|
||||
Reference in New Issue
Block a user