Repository navigation
ADFA-5094: show the offline loose-resource aggregate in the picker - #426
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.