From 0f68ecadbafd1133d4afa3413568f7ef9f296b60 Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Sat, 7 Jun 2025 03:39:57 +0800 Subject: [PATCH] fix: ensure pager list is always visible on Android to prevent blank screen --- apps/mobile/src/modules/entry-list/hooks.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/mobile/src/modules/entry-list/hooks.ts b/apps/mobile/src/modules/entry-list/hooks.ts index c12067778..27b92e167 100644 --- a/apps/mobile/src/modules/entry-list/hooks.ts +++ b/apps/mobile/src/modules/entry-list/hooks.ts @@ -10,6 +10,7 @@ import { useEventCallback } from "usehooks-ts" import { useGeneralSettingKey } from "@/src/atoms/settings/general" import { getCookie } from "@/src/lib/auth" +import { isAndroid } from "@/src/lib/platform" import { PagerListVisibleContext, PagerListWillVisibleContext } from "../screen/PagerListContext" @@ -144,7 +145,10 @@ export const usePagerListPerformanceHack = (provideRef?: RefObject({}) useEffect(() => { - setStyle({ display: nextVisible ? "flex" : "none" }) + if (!isAndroid) { + // Always show the pager list on Android to avoid blank screen when switching tabs + setStyle({ display: nextVisible ? "flex" : "none" }) + } if (nextVisible && lastY.current > 0) { requestAnimationFrame(() => { usingRef.current?.scrollToOffset({ offset: lastY.current, animated: false })