mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
Voice Chat UI fixes
This commit is contained in:
parent
e74b885bbe
commit
23d0ac26b8
@ -411,9 +411,9 @@ public class CallStatusBarNodeImpl: CallStatusBarNode {
|
||||
}
|
||||
|
||||
let spacing: CGFloat = 5.0
|
||||
let titleSize = self.titleNode.updateLayout(CGSize(width: 160.0, height: size.height))
|
||||
let subtitleSize = self.subtitleNode.updateLayout(size: CGSize(width: 160.0, height: size.height), animated: true)
|
||||
let speakerSize = self.speakerNode.updateLayout(CGSize(width: 160.0, height: size.height))
|
||||
let titleSize = self.titleNode.updateLayout(CGSize(width: 150.0, height: size.height))
|
||||
let subtitleSize = self.subtitleNode.updateLayout(size: CGSize(width: 150.0, height: size.height), animated: true)
|
||||
let speakerSize = self.speakerNode.updateLayout(CGSize(width: 150.0, height: size.height))
|
||||
|
||||
let totalWidth = titleSize.width + spacing + subtitleSize.width
|
||||
let horizontalOrigin: CGFloat = floor((size.width - totalWidth) / 2.0)
|
||||
|
@ -39,10 +39,16 @@ public final class VoiceChatOverlayController: ViewController {
|
||||
return
|
||||
}
|
||||
|
||||
if self.isButtonHidden == hidden || (!slide && self.isSlidOffscreen) {
|
||||
if self.isButtonHidden == hidden {
|
||||
return
|
||||
}
|
||||
self.isButtonHidden = hidden
|
||||
|
||||
var slide = slide
|
||||
if self.isSlidOffscreen && !hidden {
|
||||
slide = true
|
||||
}
|
||||
|
||||
self.isSlidOffscreen = hidden && slide
|
||||
|
||||
guard actionButton.supernode === self else {
|
||||
@ -382,8 +388,11 @@ public final class VoiceChatOverlayController: ViewController {
|
||||
var hidden = true
|
||||
var animated = true
|
||||
if controllers.count == 1 || controllers.last is ChatController {
|
||||
if let chatController = controllers.last as? ChatController, chatController.isSendButtonVisible {
|
||||
if let chatController = controllers.last as? ChatController {
|
||||
slide = false
|
||||
if !chatController.isSendButtonVisible {
|
||||
hidden = false
|
||||
}
|
||||
} else {
|
||||
hidden = false
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user