mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
45 lines
1.3 KiB
Swift
45 lines
1.3 KiB
Swift
import Foundation
|
|
import Postbox
|
|
import TelegramCore
|
|
import AsyncDisplayKit
|
|
|
|
final class InstantPageFeedbackItem: InstantPageItem {
|
|
var frame: CGRect
|
|
let wantsNode: Bool = true
|
|
let medias: [InstantPageMedia] = []
|
|
|
|
init(frame: CGRect) {
|
|
self.frame = frame
|
|
}
|
|
|
|
func node(account: Account, strings: PresentationStrings, theme: InstantPageTheme, openMedia: @escaping (InstantPageMedia) -> Void, openPeer: @escaping (PeerId) -> Void, openUrl: @escaping (InstantPageUrlItem) -> Void, updateWebEmbedHeight: @escaping (Int, Int) -> Void) -> (InstantPageNode & ASDisplayNode)? {
|
|
return InstantPageFeedbackNode(account: account, strings: strings, theme: theme, openPeer: openPeer)
|
|
}
|
|
|
|
func matchesAnchor(_ anchor: String) -> Bool {
|
|
return false
|
|
}
|
|
|
|
func matchesNode(_ node: InstantPageNode) -> Bool {
|
|
if node is InstantPageFeedbackNode {
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
func distanceThresholdGroup() -> Int? {
|
|
return nil
|
|
}
|
|
|
|
func distanceThresholdWithGroupCount(_ count: Int) -> CGFloat {
|
|
return 0.0
|
|
}
|
|
|
|
func linkSelectionRects(at point: CGPoint) -> [CGRect] {
|
|
return []
|
|
}
|
|
|
|
func drawInTile(context: CGContext) {
|
|
}
|
|
}
|