mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 21:45:19 +00:00
Various Fixes
This commit is contained in:
parent
22b1f0c482
commit
5011f833d4
@ -321,12 +321,20 @@ open class TelegramBaseController: ViewController, KeyShortcutResponder {
|
||||
availableGroupCall = .single(nil)
|
||||
}
|
||||
|
||||
let previousCurrentGroupCall = Atomic<PresentationGroupCall?>(value: nil)
|
||||
self.currentGroupCallDisposable = combineLatest(queue: .mainQueue(), availableGroupCall, currentGroupCall).start(next: { [weak self] availableState, currentGroupCall in
|
||||
guard let strongSelf = self else {
|
||||
return
|
||||
}
|
||||
|
||||
let panelData = currentGroupCall != nil || availableState?.participantCount == 0 ? nil : availableState
|
||||
let previousCurrentGroupCall = previousCurrentGroupCall.swap(currentGroupCall)
|
||||
|
||||
let panelData: GroupCallPanelData?
|
||||
if previousCurrentGroupCall != nil && currentGroupCall == nil && availableState?.participantCount == 1 {
|
||||
panelData = nil
|
||||
} else {
|
||||
panelData = currentGroupCall != nil || availableState?.participantCount == 0 ? nil : availableState
|
||||
}
|
||||
|
||||
let wasEmpty = strongSelf.groupCallPanelData == nil
|
||||
strongSelf.groupCallPanelData = panelData
|
||||
|
@ -138,8 +138,8 @@ private final class VoiceChatVolumeContextItemNode: ASDisplayNode, ContextMenuCu
|
||||
|
||||
let iconSize = CGSize(width: 36.0, height: 36.0)
|
||||
let iconFrame = CGRect(origin: CGPoint(x: size.width - iconSize.width - 10.0, y: floor((size.height - iconSize.height) / 2.0)), size: iconSize)
|
||||
transition.updateFrameAdditive(node: self.backgroundIconNode, frame: iconFrame)
|
||||
transition.updateFrameAdditive(node: self.foregroundIconNode, frame: iconFrame)
|
||||
self.backgroundIconNode.frame = iconFrame
|
||||
self.foregroundIconNode.frame = iconFrame
|
||||
|
||||
self.updateValue(transition: transition)
|
||||
})
|
||||
|
@ -838,7 +838,7 @@ final class ChatEmptyNode: ASDisplayNode {
|
||||
} else if let _ = interfaceState.peerNearbyData {
|
||||
contentType = .peerNearby
|
||||
} else if let _ = peer as? TelegramUser {
|
||||
if case .joined = emptyType {
|
||||
if case .joined = emptyType, !peer.isDeleted {
|
||||
contentType = .greeting
|
||||
} else {
|
||||
contentType = .regular
|
||||
|
Loading…
x
Reference in New Issue
Block a user