Various Fixes

This commit is contained in:
Ilya Laktyushin 2021-01-24 23:29:46 +03:00
parent 10612a88a4
commit b6ed138716
2 changed files with 9 additions and 1 deletions

View File

@ -353,7 +353,7 @@ public final class VoiceChatController: ViewController {
} else {
let volumeValue = peerEntry.volume.flatMap { $0 / 100 }
if let volume = volumeValue, volume != 100 {
text = .text("\(volume / 100)% \(presentationData.strings.VoiceChat_StatusSpeaking)", .constructive)
text = .text("\(volume)% \(presentationData.strings.VoiceChat_StatusSpeaking)", .constructive)
} else {
text = .text(presentationData.strings.VoiceChat_StatusSpeaking, .constructive)
}

View File

@ -307,6 +307,7 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
let loadingNode: ChatLoadingNode
private var emptyNode: ChatEmptyNode?
private var emptyType: ChatHistoryNodeLoadState.EmptyType?
private var didDisplayEmptyGreeting = false
private var validEmptyNodeLayout: (CGSize, UIEdgeInsets)?
var restrictedNode: ChatRecentActionsEmptyNode?
@ -539,6 +540,13 @@ class ChatControllerNode: ASDisplayNode, UIScrollViewDelegate {
var emptyType: ChatHistoryNodeLoadState.EmptyType?
if case let .empty(type) = loadState {
emptyType = type
if case .joined = type {
if strongSelf.didDisplayEmptyGreeting {
emptyType = .generic
} else {
strongSelf.didDisplayEmptyGreeting = true
}
}
}
strongSelf.updateIsEmpty(emptyType, animated: animated)
}