mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-08 03:00:41 +00:00
catalog capping fix
This commit is contained in:
parent
eeed1c7492
commit
e9b38db8b4
1 changed files with 4 additions and 2 deletions
|
|
@ -509,9 +509,11 @@ const CatalogScreen: React.FC<CatalogScreenProps> = ({ route, navigation }) => {
|
||||||
let nextHasMore = false;
|
let nextHasMore = false;
|
||||||
try {
|
try {
|
||||||
const svcHasMore = addonId ? stremioService.getCatalogHasMore(addonId, type, id) : undefined;
|
const svcHasMore = addonId ? stremioService.getCatalogHasMore(addonId, type, id) : undefined;
|
||||||
nextHasMore = typeof svcHasMore === 'boolean' ? svcHasMore : (catalogItems.length >= 50);
|
// If service explicitly provides hasMore, use it; otherwise assume there's more if we got any items
|
||||||
|
// This handles addons with different page sizes (not just 50 items per page)
|
||||||
|
nextHasMore = typeof svcHasMore === 'boolean' ? svcHasMore : (catalogItems.length > 0);
|
||||||
} catch {
|
} catch {
|
||||||
nextHasMore = catalogItems.length >= 50;
|
nextHasMore = catalogItems.length > 0;
|
||||||
}
|
}
|
||||||
setHasMore(nextHasMore);
|
setHasMore(nextHasMore);
|
||||||
logger.log('[CatalogScreen] Updated items and hasMore', {
|
logger.log('[CatalogScreen] Updated items and hasMore', {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue