Voice Chat Scheduling

This commit is contained in:
Ilya Laktyushin
2021-04-07 04:33:05 +03:00
parent 693aa7f106
commit b9e52f27e3
54 changed files with 6278 additions and 5164 deletions

View File

@@ -396,7 +396,7 @@ public final class VoiceChatOverlayController: ViewController {
var slide = true
var hidden = true
var animated = true
var animateInsets = true
if controllers.count == 1 || controllers.last is ChatController {
if let chatController = controllers.last as? ChatController {
slide = false
@@ -416,9 +416,13 @@ public final class VoiceChatOverlayController: ViewController {
hidden = true
}
if case .active(.cantSpeak) = state {
hidden = true
switch state {
case .active(.cantSpeak), .button, .scheduled:
hidden = true
default:
break
}
if hasVoiceChatController {
hidden = false
animated = self.initiallyHidden
@@ -429,7 +433,6 @@ public final class VoiceChatOverlayController: ViewController {
let previousInsets = self.additionalSideInsets
self.additionalSideInsets = hidden ? UIEdgeInsets() : UIEdgeInsets(top: 0.0, left: 0.0, bottom: 0.0, right: 75.0)
if previousInsets != self.additionalSideInsets {
self.parentNavigationController?.requestLayout(transition: .animated(duration: 0.3, curve: .easeInOut))
}