mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Animation and other improvements
This commit is contained in:
@@ -834,8 +834,12 @@ public final class ReactionNodePool {
|
||||
private var views: [ReactionButtonAsyncNode] = []
|
||||
|
||||
func putBack(view: ReactionButtonAsyncNode) {
|
||||
view.reset()
|
||||
self.views.append(view)
|
||||
assert(view.superview == nil)
|
||||
|
||||
if self.views.count < 64 {
|
||||
view.reset()
|
||||
self.views.append(view)
|
||||
}
|
||||
}
|
||||
|
||||
func take() -> Item {
|
||||
@@ -892,6 +896,12 @@ public final class ReactionButtonsAsyncLayoutContainer {
|
||||
public init() {
|
||||
}
|
||||
|
||||
deinit {
|
||||
for (_, button) in self.buttons {
|
||||
button.view.removeFromSuperview()
|
||||
}
|
||||
}
|
||||
|
||||
public func update(
|
||||
context: AccountContext,
|
||||
action: @escaping (String) -> Void,
|
||||
|
||||
Reference in New Issue
Block a user