mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Voice Chat UI fixes
This commit is contained in:
parent
1bbd2f0732
commit
7489524aa5
@ -101,7 +101,7 @@ final class VoiceChatOverlayController: ViewController {
|
||||
}
|
||||
|
||||
override func hitTest(_ point: CGPoint, with event: UIEvent?) -> UIView? {
|
||||
if let actionButton = self.controller?.actionButton, actionButton.frame.contains(point) {
|
||||
if let actionButton = self.controller?.actionButton, actionButton.supernode === self, actionButton.frame.contains(point) {
|
||||
return actionButton.hitTest(self.view.convert(point, to: actionButton.view), with: event)
|
||||
} else {
|
||||
return nil
|
||||
@ -113,8 +113,9 @@ final class VoiceChatOverlayController: ViewController {
|
||||
|
||||
if let actionButton = self.controller?.actionButton {
|
||||
let convertedRect = actionButton.view.convert(actionButton.bounds, to: self.view)
|
||||
let insets = layout.insets(options: [.input])
|
||||
actionButton.position = CGPoint(x: layout.size.width - layout.safeInsets.right - 21.0, y: layout.size.height - insets.bottom - 22.0)
|
||||
let insets = layout.insets(options: [.input])
|
||||
transition.updatePosition(node: actionButton, position: CGPoint(x: layout.size.width - layout.safeInsets.right - 21.0, y: layout.size.height - insets.bottom - 22.0))
|
||||
|
||||
if actionButton.supernode !== self {
|
||||
self.addSubnode(actionButton)
|
||||
|
||||
@ -148,6 +149,12 @@ final class VoiceChatOverlayController: ViewController {
|
||||
self.displayNode = Node(controller: self)
|
||||
self.displayNodeDidLoad()
|
||||
}
|
||||
|
||||
override func dismiss(completion: (() -> Void)? = nil) {
|
||||
super.dismiss(completion: completion)
|
||||
self.presentingViewController?.dismiss(animated: false, completion: nil)
|
||||
completion?()
|
||||
}
|
||||
|
||||
func animateOut(reclaim: Bool, completion: @escaping () -> Void) {
|
||||
self.controllerNode.animateOut(reclaim: reclaim, completion: completion)
|
||||
|
@ -1276,6 +1276,8 @@ extension PresentationThemeChatMessage: Codable {
|
||||
try values.encode(self.selectionControlColors, forKey: .selectionControl)
|
||||
try values.encode(self.deliveryFailedColors, forKey: .deliveryFailed)
|
||||
try encodeColor(&values, self.mediaHighlightOverlayColor, .mediaHighlightOverlay)
|
||||
try values.encode(self.stickerPlaceholderColor, forKey: .stickerPlaceholder)
|
||||
try values.encode(self.stickerPlaceholderShimmerColor, forKey: .stickerPlaceholderShimmer)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user