Skip to content

ADFA-5094: show the offline loose-resource aggregate in the picker - #426

Merged
luisguzman-adfa merged 3 commits into
mainfrom
feat/ADFA-5094-picker-loose-aggregate
Aug 18, 2026
Merged

luisguzman-adfa merged 3 commits into
mainfrom
feat/ADFA-5094-picker-loose-aggregate

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

Completes the offline topic browse (the bundle landed in the previous PR). The bundle folds
a folder's direct loose resources into a count/bytes aggregate instead of listing them, which
left a gap this closes.

KolibriTopicsUiState.isEmpty() now counts loose resources, so a folder with no sub-folders but
loose content is no longer reported empty — and, more importantly, no longer renders blank.

KolibriTopicsFragment draws one informational line for that aggregate — "N resources · size" —
after the child folders, and the level's item count includes it, so a loose-only level no longer
reads "0 items". It reuses the existing resource-count string (k2go_kolibri_resources_fmt) so no
new translation is needed; MissingTranslation is a build error across all 34 locales. The line is
skipped for the box/Studio sources, which list leaves individually (looseResourceCount 0). It
carries no checkbox: the loose leaves have no ids to pick individually, and picking the folder
already brings them.

Verified: KolibriTopicsUiStateTest covers isEmpty for loose-only, bare, and child-folder levels
(pure JVM). Fragment parse-checked; the rendered line is view code, verified on device.

The bundle folds a folder's direct loose resources into a count/bytes aggregate instead of
listing them, so two things follow. isEmpty() now counts loose resources, so a folder with
only loose content no longer reads as empty (and no longer renders blank). And the level
draws one informational line — "N resources · size" — for that aggregate, reusing the
existing resource-count string so no new translation is needed (MissingTranslation is a build
error across 34 locales). The line is skipped for the box/Studio sources, which list leaves
individually (looseResourceCount 0); picking the folder still brings the loose leaves, so the
line carries no checkbox.
The bundle folds a folder's direct loose resources into a count/bytes aggregate instead of
listing them, so two things follow. isEmpty() now counts loose resources, so a folder with
only loose content no longer reads as empty (and no longer renders blank). And the level
draws one informational line — "N resources · size" — for that aggregate, reusing the
existing resource-count string so no new translation is needed (MissingTranslation is a build
error across 34 locales). The line is skipped for the box/Studio sources, which list leaves
individually (looseResourceCount 0); picking the folder still brings the loose leaves, so the
line carries no checkbox.
…pdevforall/iiab-android into feat/ADFA-5094-picker-loose-aggregate
@luisguzman-adfa
luisguzman-adfa merged commit 8f8b606 into main Aug 18, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the feat/ADFA-5094-picker-loose-aggregate branch August 18, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant