diff --git a/mobile/src/changelog.ts b/mobile/src/changelog.ts index a6f0049..9a92ef2 100644 --- a/mobile/src/changelog.ts +++ b/mobile/src/changelog.ts @@ -16,6 +16,15 @@ export type ChangelogEntry = { }; export const CHANGELOG: ChangelogEntry[] = [ + { + id: '2026-08-20c', + date: 'August 2026', + items: [ + 'Fixed a crash that closed the app while scrolling lists. It came from the trick we used to stop the grid jumping when fresh scenes arrive; the crash was worse than the jump, so the trick is gone until we move to a newer React Native.', + 'Site pages now put newly added scenes at the top. Most tubes never report a release date, so those scenes were sorted to the very bottom and the site looked frozen even though it was not.', + 'Thumbnails that used to stay blank now load, including sites whose image servers refuse our server directly.', + ], + }, { id: '2026-08-20b', date: 'August 2026', diff --git a/mobile/src/components/SceneTile.tsx b/mobile/src/components/SceneTile.tsx index 2b0a1a6..298fd7e 100644 --- a/mobile/src/components/SceneTile.tsx +++ b/mobile/src/components/SceneTile.tsx @@ -370,10 +370,13 @@ export function sceneGridProps(cols: number) { maxToRenderPerBatch: 8, initialNumToRender: 8, updateCellsBatchingPeriod: 50, - // Anti-jank (report): sort=created_at desc → scrapery dosypują nowe sceny NA GÓRĘ. - // Gdy refetch wstawi je nad viewportem, treść skacze/tearing pod palcem. RN pinuje - // widoczny element (minIndexForVisible:0) i sam koryguje offset. autoscrollToTopThreshold: - // gdy user jest przy samej górze (<48px), nowe wskakują normalnie; niżej lista stoi. - maintainVisibleContentPosition: { minIndexForVisible: 0, autoscrollToTopThreshold: 48 }, + // NIE dodawaj tu z powrotem `maintainVisibleContentPosition`. Byla tu jako anti-jank + // (przy sort=created_at scrapery dosypuja sceny na gore, wiec refetch potrafil szarpnac + // trescia pod palcem), ale w React Native 0.76.9 ta wlasciwosc wywala apke NA AMEN: + // MaintainVisibleScrollPositionHelper.getUIManagerModule() robi assertNotNull i gdy + // ScrollView powstaje w momencie, w ktorym UIManager jest niedostepny, leci + // AssertionError o poziomie fatal. GOON-1S: 53 wystapienia u 35 osob od 2026-07-03, + // wylacznie ten jeden lancuch przyczyn. Skakanie listy jest gorsze niz nic, ale crash + // jest gorszy od skakania. Do rozwazenia ponownie po podniesieniu React Native. }; } diff --git a/mobile/src/screens/MoviesScreen.tsx b/mobile/src/screens/MoviesScreen.tsx index 043830c..349bd79 100644 --- a/mobile/src/screens/MoviesScreen.tsx +++ b/mobile/src/screens/MoviesScreen.tsx @@ -94,6 +94,9 @@ export function MoviesScreen() { }), initialPageParam: 1, getNextPageParam: (last) => { + // Defensywa: react-query potrafi zawolac to z niepelna strona, gdy fetch padl + // w polowie. Bez tego leci TypeError zamiast zwyklego konca paginacji (GOON-4N). + if (!last) return undefined; const loaded = last.page * last.per_page; return loaded < last.total ? last.page + 1 : undefined; }, diff --git a/mobile/src/screens/ScenesScreen.tsx b/mobile/src/screens/ScenesScreen.tsx index 2dc1364..a11004e 100644 --- a/mobile/src/screens/ScenesScreen.tsx +++ b/mobile/src/screens/ScenesScreen.tsx @@ -100,6 +100,7 @@ export function ScenesScreen({ }), initialPageParam: 1, getNextPageParam: (lastPage) => { + if (!lastPage) return undefined; // Paginuj po has_more (źródło prawdy z fetcha per_page+1). `total` jest dla // list filtrowanych bounded ("1000+"), więc NIE nadaje się do liczenia stron. // Fallback na loaded { + if (!lastPage) return undefined; // Paginuj po has_more (z fetcha per_page+1). `total` bywa bounded ("1000+"). const more = lastPage.has_more ?? lastPage.page * lastPage.per_page < lastPage.total; diff --git a/mobile/src/screens/StudioMoviesScreen.tsx b/mobile/src/screens/StudioMoviesScreen.tsx index 7ad3802..83890b7 100644 --- a/mobile/src/screens/StudioMoviesScreen.tsx +++ b/mobile/src/screens/StudioMoviesScreen.tsx @@ -78,6 +78,7 @@ export function StudioMoviesScreen() { }), initialPageParam: 1, getNextPageParam: (last) => { + if (!last) return undefined; const loaded = last.page * last.per_page; return loaded < last.total ? last.page + 1 : undefined; },