mirror of
https://github.com/ichmagmaus111/ghostgram.git
synced 2026-11-03 14:17:19 +01:00
Ghostgram for iOS, rebuilt from scratch on Telegram iOS 13.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.2 KiB
Swift
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
|
|
}
|
|
}
|