fix: update pagination logic to handle cases with zero items

This commit is contained in:
tapframe 2026-03-30 13:46:13 +05:30
parent f01427fea3
commit d998c2d7b4

View file

@ -37,7 +37,7 @@ suspend fun fetchCatalogPage(
payload = payload,
maxItems = maxItems,
)
val nextSkip = if (parsed.rawItemCount >= CATALOG_PAGE_SIZE) {
val nextSkip = if (parsed.rawItemCount > 0) {
(skip ?: 0) + CATALOG_PAGE_SIZE
} else {
null