Voice Chat Fixes

This commit is contained in:
Ilya Laktyushin 2021-04-08 23:15:26 +03:00
parent 862404a4b8
commit 9e68f36042

View File

@ -2880,6 +2880,10 @@ public final class VoiceChatController: ViewController {
}
self.topPanelBackgroundNode.frame = CGRect(x: 0.0, y: topPanelHeight - 24.0, width: size.width, height: 24.0)
guard self.panGestureArguments == nil else {
return
}
var bottomEdge: CGFloat = 0.0
self.listNode.forEachItemNode { itemNode in
if let itemNode = itemNode as? ListViewItemNode {
@ -2891,15 +2895,19 @@ public final class VoiceChatController: ViewController {
}
let listMaxY = listTopInset + listSize.height
if bottomEdge.isZero {
bottomEdge = listMaxY
}
var bottomOffset: CGFloat = min(0.0, bottomEdge - listMaxY)
//min(bottomEdge, listMaxY)
var bottomOffset: CGFloat = bottomEdge - listMaxY
// if bottomEdge < listMaxY && (self.panGestureArguments != nil || self.isExpanded) {
//
// if bottomEdge.isZero {
// bottomEdge = listMaxY
// }
//
// var bottomOffset: CGFloat = min(0.0, bottomEdge - listMaxY)
// if bottomEdge < listMaxY && self.isExpanded {
// bottomOffset = bottomEdge - listMaxY
// }
//
let bottomCornersFrame = CGRect(origin: CGPoint(x: sideInset, y: -50.0 + bottomOffset), size: CGSize(width: size.width - sideInset * 2.0, height: 50.0))
let previousBottomCornersFrame = self.bottomCornersNode.frame
if !bottomCornersFrame.equalTo(previousBottomCornersFrame) {