// A feed row's tap: its own database first, then its route.//// Today, search and "Asked of you" draw rows from several databases// (`CottonKit/FeedRows.swift`). A row from a database opens the way a link// does — `DatabaseLinkPlacing` shows that database in this window, then the// route opens — so the page that opens is read from the database the row was// in. A row with no database opens at once, exactly as before.importCottonKitimportSwiftUI/// Opens feed rows in ONE window.@MainActorstructFeedRowOpening {/// The window's placing, or nil where the window has no held list or/// scene (a gallery specimen, a test host): every row then opens as/// before.let placing: DatabaseLinkPlacing?init(placing: DatabaseLinkPlacing?) {self.placing = placing }/// The window's own placing, from what its root put in the environment.init(model: DatabasesModel?, scene: DatabaseScene?, toasts: ToastCenter?) {iflet model, let scene, let toasts { placing = DatabaseLinkPlacing(model: model, scene: scene, toasts: toasts) } else { placing = nil } }/// Push `route` from a row in `database` — a row is a record you looked/// into, so back belongs on the feed: at once with no database, else once/// the window shows that database, and not at all when this device does/// not hold it. Answers the placing's task, or nil when it pushed at once. @discardableResultfuncopen(_ route: Route, in database: FeedRowDatabase?, on navigator: Navigator) -> Task<Void, Never>? {guardlet database, let placing else { navigator.push(route)returnnil }let link = FeedRowDatabase.link(database, route: route)returnTask { @MainActor iniflet placed = await placing.place(link) { navigator.push(placed) } } }}