Members
(static, constant) BADGE_ICON_CC
- Default Value
- cc
(static, constant) BADGE_ICON_NONE
Which icon a badge draws. Both Posters live in every slot with their uri assigned once — see SubtitleResultRow.buildBadgePool for the full reasoning.
(static, constant) BADGE_ICON_SIZE
- Default Value
- 22
(static, constant) BADGE_POOL_SIZE
Badge slots pre-allocated per row, sized to the most badges a single row of this type can carry so the pool never grows mid-scroll.
- Default Value
- 2
Methods
(static) badgesFor(content) → {object}
badgesFor: Only the flags that change what the track IS, most significant first.
Order is load-bearing: when a row cannot fit every badge, the ones dropped are the last in this list (see placeBadges).
No "perfect match" here — that is a property of a provider search result, not of a file already on disk — and no download count, which an installed subtitle does not have. Rendering those was what made the first draft's right-hand column read as broken.
| Name | Type | Description |
|---|---|---|
content | object |
- Type:
- object
(static) buildBadgePool() → {void}
buildBadgePool: Create the badge nodes ONCE.
MarkupList recycles a small set of row components as the list scrolls, writing a new itemContent into each. The first draft tore down and rebuilt every badge child on each of those writes, so a single scroll step cost a burst of node create/destroy per visible row -- which is what made scrolling feel heavy. Nodes are now created once; only their text, colour and visibility change.
- Type:
- void
(static) fillBadgeSlot(slot, badge) → {void}
fillBadgeSlot: Draw one badge in a slot. Chooses WHICH resident icon shows; never assigns a uri, which is what keeps a recycled row from rebinding a texture.
| Name | Type | Description |
|---|---|---|
slot | object | |
badge | object |
- Type:
- void
(static) init() → {void}
- Type:
- void
(static) newBadge(text, color, iconKind) → {object}
newBadge: A wanted badge with its rendered width, measured once per content.
| Name | Type | Description |
|---|---|---|
text | string | |
color | string | |
iconKind | string |
- Type:
- object
(static) newBadgeIcon(holder, uri) → {object}
newBadgeIcon: one resident, pre-bound badge Poster, collapsed until used. Starts at zero WIDTH rather than merely hidden — an invisible LayoutGroup child still takes its place in the layout, which is what leaves a badge with no icon indented from one that has it.
| Name | Type | Description |
|---|---|---|
holder | object | |
uri | string |
- Type:
- object
(static) onFocusChanged() → {void}
- Type:
- void
(static) onItemContentChanged() → {void}
- Type:
- void
(static) onSizeChanged() → {void}
- Type:
- void
(static) placeBadges() → {void}
placeBadges: Show as many wanted badges as the row allows, right-aligned.
Filled into the LAST slots of the pool, in order, and the unused slots are hidden. badgeRow is right-aligned, so the last slot sits on the row's right edge; a hidden slot still takes its place in a LayoutGroup, so leaving the unused ones at the FRONT keeps them out of the way instead of pushing the visible badges in from the edge.
- Type:
- void
(static) titleLineFor(content) → {string}
titleLineFor: "English · SRT".
Language first because that is what this column is scanned for. The codec follows because it is the one remaining property that changes how the track behaves (an image-based format forces transcoding where a text one does not).
| Name | Type | Description |
|---|---|---|
content | object |
- Type:
- string