From 653f94de860982703bcd46ea93c30af21649999b Mon Sep 17 00:00:00 2001 From: "Sven (AAMOS AI)" Date: Mon, 17 Aug 2026 21:17:24 +0700 Subject: [PATCH] =?UTF-8?q?feat(mobile):=20MIKRO=20POLISH-2=20cyklande=20l?= =?UTF-8?q?addningsmeddelanden=20p=C3=A5=20scan-v=C3=A4ntan?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/mobile/src/app/scan-review/[jobId].tsx | 2 +- apps/mobile/src/components/ui.tsx | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/mobile/src/app/scan-review/[jobId].tsx b/apps/mobile/src/app/scan-review/[jobId].tsx index 582dbac..9894134 100644 --- a/apps/mobile/src/app/scan-review/[jobId].tsx +++ b/apps/mobile/src/app/scan-review/[jobId].tsx @@ -167,7 +167,7 @@ export default function ScanReviewScreen() { if (query.isLoading || job?.status === "queued" || job?.status === "running") { return ( - + {t("scan.analyzing")} ); diff --git a/apps/mobile/src/components/ui.tsx b/apps/mobile/src/components/ui.tsx index 03a8d79..37b63bc 100644 --- a/apps/mobile/src/components/ui.tsx +++ b/apps/mobile/src/components/ui.tsx @@ -1,4 +1,5 @@ import type { PropsWithChildren, ReactNode } from "react"; +import { useEffect, useState } from "react"; import { ActivityIndicator, KeyboardAvoidingView, @@ -204,11 +205,20 @@ export function ProgressBar({ ); } -export function LoadingView() { +export function LoadingView({ messages }: { messages?: string[] } = {}) { + const [i, setI] = useState(0); + const list = messages ?? []; + useEffect(() => { + setI(0); + if (list.length <= 1) return; + const id = setInterval(() => setI((v) => (v + 1 < list.length ? v + 1 : v)), 1800); + return () => clearInterval(id); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [list.length]); return ( - {t("common.loading")} + {list.length ? list[i] : t("common.loading")} ); }