mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-04-27 13:27:18 +02:00
4647310322
Based on Swiftgram 12.5 (Telegram iOS 12.5). All GLEGram features ported and organized in GLEGram/ folder. Features: Ghost Mode, Saved Deleted Messages, Content Protection Bypass, Font Replacement, Fake Profile, Chat Export, Plugin System, and more. See CHANGELOG_12.5.md for full details.
42 lines
1.5 KiB
Swift
42 lines
1.5 KiB
Swift
import Foundation
|
|
import UIKit
|
|
import AsyncDisplayKit
|
|
import Display
|
|
|
|
public protocol ItemListControllerSearchNavigationContentNode {
|
|
func activate()
|
|
func deactivate()
|
|
|
|
func setQueryUpdated(_ f: @escaping (String) -> Void)
|
|
}
|
|
|
|
public protocol ItemListControllerSearch {
|
|
func isEqual(to: ItemListControllerSearch) -> Bool
|
|
func titleContentNode(current: (NavigationBarContentNode & ItemListControllerSearchNavigationContentNode)?) -> (NavigationBarContentNode & ItemListControllerSearchNavigationContentNode)?
|
|
func node(current: ItemListControllerSearchNode?, titleContentNode: (NavigationBarContentNode & ItemListControllerSearchNavigationContentNode)?) -> ItemListControllerSearchNode
|
|
}
|
|
|
|
open class ItemListControllerSearchNode: ASDisplayNode {
|
|
open var addedUnderNavigationBar: Bool = false
|
|
|
|
open func activate() {
|
|
self.layer.animateAlpha(from: 0.0, to: 1.0, duration: 0.2, timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue)
|
|
}
|
|
|
|
open func deactivate() {
|
|
self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.2, timingFunction: CAMediaTimingFunctionName.easeInEaseOut.rawValue, removeOnCompletion: false, completion: { [weak self] _ in
|
|
self?.removeFromSupernode()
|
|
})
|
|
}
|
|
|
|
open func scrollToTop() {
|
|
}
|
|
|
|
open func queryUpdated(_ query: String) {
|
|
}
|
|
|
|
open func updateLayout(layout: ContainerViewLayout, navigationBarHeight: CGFloat, transition: ContainedViewLayoutTransition) {
|
|
}
|
|
}
|
|
|