mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Send choosing sticker activity
This commit is contained in:
@@ -69,6 +69,9 @@ final class ChatMediaInputStickerPane: ChatMediaInputPane {
|
||||
private var didScrollPreviousOffset: CGFloat?
|
||||
private var didScrollPreviousState: ChatMediaInputPaneScrollState?
|
||||
|
||||
var beganScrolling: (() -> Void)?
|
||||
var endedScrolling: (() -> Void)?
|
||||
|
||||
init(theme: PresentationTheme, strings: PresentationStrings, paneDidScroll: @escaping (ChatMediaInputPane, ChatMediaInputPaneScrollState, ContainedViewLayoutTransition) -> Void, fixPaneScroll: @escaping (ChatMediaInputPane, ChatMediaInputPaneScrollState) -> Void) {
|
||||
self.gridNode = GridNode()
|
||||
self.paneDidScroll = paneDidScroll
|
||||
@@ -98,12 +101,16 @@ final class ChatMediaInputStickerPane: ChatMediaInputPane {
|
||||
}
|
||||
}
|
||||
}
|
||||
self.gridNode.scrollingInitiated = { [weak self] in
|
||||
self?.beganScrolling?()
|
||||
}
|
||||
self.gridNode.scrollingCompleted = { [weak self] in
|
||||
if let strongSelf = self {
|
||||
if let didScrollPreviousState = strongSelf.didScrollPreviousState {
|
||||
strongSelf.fixPaneScroll(strongSelf, didScrollPreviousState)
|
||||
}
|
||||
fixGridScrolling(strongSelf.gridNode)
|
||||
strongSelf.endedScrolling?()
|
||||
}
|
||||
}
|
||||
self.gridNode.setupNode = { [weak self] itemNode in
|
||||
|
||||
Reference in New Issue
Block a user