Language filter from real catalogue values (#282)#27
Conversation
The search filter's language chips were a hardcoded ISO-code list ("ita", "eng",
"deu", …) sent to the API as `language=…`. But the backend stores `libri.lingua`
as unnormalized free text ("italiano", "English", "Deutsch", "Français"), so the
code never matched anything: filtering by a language — alone or combined with a
category / author / publisher — returned zero results (issue #282).
The app now loads the real language values from GET /api/v1/catalog/languages
(added on the backend), exactly as it already sources genres, and renders those
as the language chips. A selected language is sent verbatim and matches the
collection (the backend also compares case/space-insensitively now).
- Models: LanguageValue(language, count).
- PinakesApi + CatalogRepository: catalog/languages call.
- SearchViewModel: languages state + loadLanguages() in init; removed the
hardcoded SearchLanguageOptions/LanguageOption.
- SearchFilterSheet: render state.languages instead of the fixed list.
Requires the backend /catalog/languages endpoint (Pinakes PR). compileDebugKotlin
BUILD SUCCESSFUL.
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes the Android side of #282 (HansUwe52). Pairs with the Pinakes backend PR that adds
GET /api/v1/catalog/languages.Problem
The search filter's language chips were a hardcoded ISO-code list (
ita,eng,fra,deu,spa,lat) sent to the API aslanguage=…. The backend storeslibri.linguaas unnormalized free text (italiano,English,Deutsch,Français), so the code never matched: filtering by a language — alone or combined with category / author / publisher — returned no results. Category/author/publisher worked because they're sourced from the collection; language was the odd one out.Fix
Load the language chips from
GET /api/v1/catalog/languages— the real values present in the catalogue, with counts — exactly as the app already sources genres. A selected value is sent verbatim and matches (the backend also compares case/space-insensitively now).LanguageValue(language, count)model.catalog/languagesinPinakesApi+CatalogRepository.SearchViewModel:languagesstate +loadLanguages(); removed the hardcodedSearchLanguageOptions.SearchFilterSheet: rendersstate.languages.Notes
/catalog/languagesendpoint (Pinakes PR).compileDebugKotlinBUILD SUCCESSFUL.title_asc/title_descsort viaBookSort; wiring a sort control on the browse screen can follow.