mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Various improvements
This commit is contained in:
@@ -18986,6 +18986,17 @@ public final class ChatControllerImpl: TelegramBaseController, ChatController, G
|
||||
public func transferScrollingVelocity(_ velocity: CGFloat) {
|
||||
self.chatDisplayNode.historyNode.transferVelocity(velocity)
|
||||
}
|
||||
|
||||
public func performScrollToTop() -> Bool {
|
||||
let offset = self.chatDisplayNode.historyNode.visibleContentOffset()
|
||||
switch offset {
|
||||
case let .known(value) where value <= CGFloat.ulpOfOne:
|
||||
return false
|
||||
default:
|
||||
self.chatDisplayNode.historyNode.scrollToEndOfHistory()
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final class ChatContextControllerContentSourceImpl: ContextControllerContentSource {
|
||||
|
||||
Reference in New Issue
Block a user