Fix browse pagination and infinite scroll for GROUPED duplicate handling - #181
Open
disclosurez wants to merge 1 commit into
Open
Fix browse pagination and infinite scroll for GROUPED duplicate handling#181disclosurez wants to merge 1 commit into
disclosurez wants to merge 1 commit into
Conversation
…filter Three independent fixes for browsing with GROUPED duplicate handling: 1. Remove SHOW_ALL requirement from canUseCursorWindow — allows the cursor pagination path to be used with GROUPED mode, giving proper infinite scroll instead of the capped 200-item non-cursor path. 2. Use rawTotalCount for canLoadMore — previously GROUPED mode computed totalCount from a non-cursor path capped at SEARCH_RESULT_LIMIT=200, causing canLoadMore to go false once the cursor loaded more than 200 items. Now uses the actual database count. 3. Remove added_at > 0 filter from FreshCursor queries — items with added_at=0 were excluded from cursor results but counted in the total, causing canLoadMore to stay true forever without loading new items.
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.
Three fixes for browsing with GROUPED (or SMART) VOD duplicate handling mode:
Allow cursor browsing with GROUPED —
canUseCursorWindowpreviously requiredduplicateHandlingMode == SHOW_ALL. Removed that check so GROUPED mode uses the efficient cursor pagination path instead of the capped 200-item non-cursor path.Fix
canLoadMorefor GROUPED — ThetotalCountfor GROUPED mode was computed from a full non-cursor load (capped at SEARCH_RESULT_LIMIT=200), but the cursor path could load more items than that. Once the cursor exceeded 200 items,canLoadMorebecame false, stopping infinite scroll prematurely. Now uses the actual database count (rawTotalCount) regardless of duplicate handling mode.Remove
added_at > 0filter from FreshCursor queries — Items withadded_at=0(null/deprecated from provider) were excluded from cursor results but still counted in the total. This causedcanLoadMoreto stay true forever without loading new items. Removed the filter from all movie FreshCursor and FreshByCategoryCursor queries so the cursor returns all items matching the provider/category.Files changed
data/.../repository/MovieRepositoryImpl.kt— canUseCursorWindow + totalCountdata/.../repository/SeriesRepositoryImpl.kt— canUseCursorWindow + totalCountdata/.../local/dao/Daos.kt— removed added_at>0 from 6 FreshCursor queries