Members
(static, constant) BADGE_ICON_CC
- Default Value
- cc
(static, constant) BADGE_ICON_NONE
Which icon a badge draws. A slot can show either, so both Posters exist in every slot with their uri assigned ONCE — see buildBadgePool.
(static, constant) BADGE_ICON_SIZE
Badge icons render at the badge line's cap height so they optically match the label beside them rather than towering over it.
- Default Value
- 22
(static, constant) BADGE_ICON_STAR
- Default Value
- star
(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
- 4
Methods
(static) badgesFor(content) → {object}
badgesFor: The flags that sit at the right of the meta line, most significant first.
Order is significance order, and that is load-bearing rather than cosmetic: when a row cannot fit every badge, the ones dropped are the last in this list (see placeBadges).
Only truths worth acting on get a badge. "Perfect match" leads because a hash-matched subtitle is the one signal that reliably predicts sync; the translation/impairment flags follow because they change whether the file is the right KIND of subtitle, not just whether it fits.
Each badge is an icon plus its label. The icons carry the meaning at a glance and the words disambiguate them, which matters because "perfect match" is not self-evident from a star alone. Colour does the ranking: the star takes colorPrimary because it is the signal worth acting on, everything else takes colorTextSecondary so it reads as a qualifier rather than a recommendation.
| 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) groupThousands(value) → {string}
groupThousands: 561277 -> "561,277". Download counts span four orders of magnitude in real result sets, and unpunctuated six-digit numbers are hard to size up at 10 feet.
| Name | Type | Description |
|---|---|---|
value | integer |
- Type:
- string
(static) init() → {void}
- Type:
- void
(static) metaLineFor(content) → {string}
metaLineFor: "561,277 downloads . pirosasz . 2012", dropping any segment whose value is missing rather than rendering an empty gap.
Provider and format join the line only when the panel flagged them as varying across the result set.
| Name | Type | Description |
|---|---|---|
content | object |
- Type:
- string
(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 SIZE, not merely hidden, and that distinction is load-bearing: measured on device, an invisible LayoutGroup child still occupies its slot in the layout — hiding a 22px icon left a 22px hole plus its spacing, which is how a badge with no icon ends up indented from one that has it. Width is therefore what this row toggles; visible just follows it.
| Name | Type | Description |
|---|---|---|
holder | object | |
uri | string |
- Type:
- object
(static) onFocusChanged() → {void}
onFocusChanged: the marquee, and nothing else.
The focus BORDER and surface are the list's now (see the XML), so all that is left here is the one thing a shared indicator cannot do: start and stop this row's own scrolling label. The colour used to be re-applied in both branches to the same value it is already given in init(), which is a write per focus change that could never change anything.
- 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) titleFor(content) → {string}
titleFor: The release name, which is what a user actually matches against their file. Falls back to the language when a provider returns no Name.
| Name | Type | Description |
|---|---|---|
content | object |
- Type:
- string
(static) yearFrom(dateCreated) → {string}
yearFrom: The year out of an ISO-8601 timestamp, or "" when absent/malformed. Upload year is a useful staleness cue (sampled results ranged 2012..2015) and is cheaper to read at a glance than a full date.
| Name | Type | Description |
|---|---|---|
dateCreated | dynamic |
- Type:
- string