mirror of
https://github.com/lichess-org/mobile.git
synced 2026-05-26 13:50:52 +00:00
Document
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
import Foundation
|
||||
|
||||
struct BroadcastItem: Identifiable {
|
||||
let id: String // round ID used for linking
|
||||
let title: String // group name or tour name
|
||||
let id: String
|
||||
/// Group name when the broadcast belongs to a grouped tournament, otherwise the tour name.
|
||||
let title: String
|
||||
let roundName: String
|
||||
let tourSlug: String
|
||||
let roundSlug: String
|
||||
let isLive: Bool
|
||||
let startsAt: Date?
|
||||
let imageData: Data? // tournament thumbnail fetched from the API
|
||||
let thumbnailImageName: String? // bundled asset name used as static fallback (widget gallery)
|
||||
let imageData: Data?
|
||||
/// Bundled asset name used as a static fallback in the widget gallery when no network image is available.
|
||||
let thumbnailImageName: String?
|
||||
|
||||
/// Builds the lichess.org broadcast URL for this item.
|
||||
/// Slugs are SEO-only so the actual round id drives routing.
|
||||
/// Slugs are SEO-only; the round id is what actually drives routing.
|
||||
func broadcastURL() -> URL? {
|
||||
LichessAppGroup.lichessURL(
|
||||
path: "/broadcast/\(tourSlug)/\(roundSlug)/\(id)"
|
||||
|
||||
Reference in New Issue
Block a user