Various Fixes

This commit is contained in:
Ilya Laktyushin
2021-11-21 01:49:56 +04:00
parent 26b0b4021c
commit a92a444c05
4 changed files with 35 additions and 4 deletions

View File

@@ -1167,9 +1167,16 @@ public final class ChatHistoryListNode: ListView, ChatHistoryNode {
}
var scrollAnimationCurve: ListViewAnimationCurve? = nil
if let strongSelf = self, strongSelf.appliedPlayingMessageId != currentlyPlayingMessageId, let currentlyPlayingMessageId = currentlyPlayingMessageId {
updatedScrollPosition = .index(index: .message(currentlyPlayingMessageId), position: .center(.bottom), directionHint: .Down, animated: true, highlight: true)
scrollAnimationCurve = .Spring(duration: 0.4)
if let strongSelf = self, case .default = source {
if strongSelf.appliedPlayingMessageId != currentlyPlayingMessageId, let currentlyPlayingMessageId = currentlyPlayingMessageId {
if isFirstTime {
} else if case let .peer(peerId) = chatLocation, currentlyPlayingMessageId.id.peerId != peerId {
} else {
updatedScrollPosition = .index(index: .message(currentlyPlayingMessageId), position: .center(.bottom), directionHint: .Up, animated: true, highlight: true)
scrollAnimationCurve = .Spring(duration: 0.4)
}
}
isFirstTime = false
}
var disableAnimations = false