mirror of
https://github.com/GLEGram/GLEGram-iOS.git
synced 2026-04-24 11:56: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.
40 lines
927 B
Swift
40 lines
927 B
Swift
import Foundation
|
|
import UIKit
|
|
import AsyncDisplayKit
|
|
|
|
public protocol GridSection {
|
|
var height: CGFloat { get }
|
|
var hashValue: Int { get }
|
|
|
|
func isEqual(to: GridSection) -> Bool
|
|
func node() -> ASDisplayNode
|
|
}
|
|
|
|
public protocol GridItem {
|
|
var section: GridSection? { get }
|
|
func node(layout: GridNodeLayout, synchronousLoad: Bool) -> GridItemNode
|
|
func update(node: GridItemNode)
|
|
var aspectRatio: CGFloat { get }
|
|
var fillsRowWithHeight: (CGFloat, Bool)? { get }
|
|
var fillsRowWithDynamicHeight: ((CGFloat) -> CGFloat)? { get }
|
|
var customItemSize: CGSize? { get }
|
|
}
|
|
|
|
public extension GridItem {
|
|
var aspectRatio: CGFloat {
|
|
return 1.0
|
|
}
|
|
|
|
var fillsRowWithHeight: (CGFloat, Bool)? {
|
|
return nil
|
|
}
|
|
|
|
var fillsRowWithDynamicHeight: ((CGFloat) -> CGFloat)? {
|
|
return nil
|
|
}
|
|
|
|
var customItemSize: CGSize? {
|
|
return nil
|
|
}
|
|
}
|