mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Video message recording improvements
This commit is contained in:
@@ -310,6 +310,8 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
||||
|
||||
let viewOnceButton = Child(PlainButtonComponent.self)
|
||||
let recordMoreButton = Child(PlainButtonComponent.self)
|
||||
|
||||
let muteIcon = Child(ZStack<Empty>.self)
|
||||
|
||||
return { context in
|
||||
let environment = context.environment[ViewControllerComponentContainer.Environment.self].value
|
||||
@@ -455,6 +457,35 @@ private final class VideoMessageCameraScreenComponent: CombinedComponent {
|
||||
)
|
||||
}
|
||||
|
||||
if component.isPreviewing && component.isMuted {
|
||||
let muteIcon = muteIcon.update(
|
||||
component: ZStack([
|
||||
AnyComponentWithIdentity(
|
||||
id: "background",
|
||||
component: AnyComponent(
|
||||
RoundedRectangle(color: UIColor(rgb: 0x000000, alpha: 0.3), cornerRadius: 24.0)
|
||||
)
|
||||
),
|
||||
AnyComponentWithIdentity(
|
||||
id: "icon",
|
||||
component: AnyComponent(
|
||||
BundleIconComponent(
|
||||
name: "Chat/Message/InstantVideoMute",
|
||||
tintColor: .white
|
||||
)
|
||||
)
|
||||
)
|
||||
]),
|
||||
availableSize: CGSize(width: 24.0, height: 24.0),
|
||||
transition: context.transition
|
||||
)
|
||||
context.add(muteIcon
|
||||
.position(CGPoint(x: component.previewFrame.midX, y: component.previewFrame.maxY - 24.0))
|
||||
.appear(.default(scale: true, alpha: true))
|
||||
.disappear(.default(scale: true, alpha: true))
|
||||
)
|
||||
}
|
||||
|
||||
return availableSize
|
||||
}
|
||||
}
|
||||
@@ -1466,7 +1497,7 @@ public class VideoMessageCameraScreen: ViewController {
|
||||
}
|
||||
|
||||
public func hideVideoSnapshot() {
|
||||
self.node.previewContainerView.alpha = 0.02
|
||||
self.node.previewContainerView.isHidden = true
|
||||
}
|
||||
|
||||
public func updateTrimRange(start: Double, end: Double, updatedEnd: Bool, apply: Bool) {
|
||||
|
||||
Reference in New Issue
Block a user