Files
ichmagmaus111andClaude Opus 5.5 0622057a4f Ghostgram: open-source release
Ghostgram for iOS, rebuilt from scratch on Telegram iOS 13.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 17:57:09 +01:00

33 lines
1.2 KiB
Swift

import Foundation
import Display
import ItemListUI
/// `BotCheckoutPriceItem` asks two things about its neighbors that have nothing to do with headers:
/// whether the item above is the checkout header (extra top offset), and whether the item below is
/// the final price row (extra bottom padding).
protocol BotCheckoutNeighborFacet {
var isCheckoutHeaderItem: Bool { get }
/// `nil` when the neighbor is not a price item at all.
var priceItemIsFinal: Bool? { get }
}
struct BotCheckoutNeighborDescriptor: Equatable, ItemListNeighborFacet, BotCheckoutNeighborFacet {
let sectionId: ItemListSectionId
let isAlwaysPlain: Bool
let requestsNoInset: Bool
let isTextItem: Bool
let hasActiveRevealOptions: Bool
let isCheckoutHeaderItem: Bool
let priceItemIsFinal: Bool?
init(sectionId: ItemListSectionId, isAlwaysPlain: Bool, requestsNoInset: Bool, isCheckoutHeaderItem: Bool, priceItemIsFinal: Bool?) {
self.sectionId = sectionId
self.isAlwaysPlain = isAlwaysPlain
self.requestsNoInset = requestsNoInset
self.isTextItem = false
self.hasActiveRevealOptions = false
self.isCheckoutHeaderItem = isCheckoutHeaderItem
self.priceItemIsFinal = priceItemIsFinal
}
}