From 899b1d9812c61a33554b67e3026850684e686ce1 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 22 Oct 2026 12:27:34 +0200 Subject: Splash gates the app while Foldergram indexes Foldergram is unusably slow during a scan, so the splash (renamed from LockActivity) now shows on every start and return to the app: PIN if set, then it polls /api/scan-progress every 5 s and stays on "Library is indexing" until the scan ends. Home connects only after the splash. Builds and deploys; the indexing path is not yet tested on the TV. Co-Authored-By: Claude Opus 5.5 --- app/src/main/java/mygram/droid/App.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/src/main/java/mygram/droid/App.java') diff --git a/app/src/main/java/mygram/droid/App.java b/app/src/main/java/mygram/droid/App.java index 1919343..a6fb9c8 100644 --- a/app/src/main/java/mygram/droid/App.java +++ b/app/src/main/java/mygram/droid/App.java @@ -24,7 +24,7 @@ import java.net.CookieManager; import java.net.CookiePolicy; public final class App extends Application implements Application.ActivityLifecycleCallbacks { - /** Until the PIN is entered; set again whenever the app leaves the screen. */ + /** Until the splash lets the user in; set again whenever the app leaves the screen. */ static boolean locked = true; private int started; @@ -38,12 +38,12 @@ public final class App extends Application implements Application.ActivityLifecy CookieHandler.setDefault(new CookieManager(null, CookiePolicy.ACCEPT_ALL)); } - /** Before any screen draws, cover it with the PIN prompt if the app is locked. */ + /** Before any screen draws, cover it with the splash (PIN, indexing wait) until it lets the user in. */ @Override public void onActivityStarted(Activity a) { started++; - if (locked && Prefs.hasPin() && !(a instanceof LockActivity)) - a.startActivity(new Intent(a, LockActivity.class)); + if (locked && !(a instanceof SplashActivity)) + a.startActivity(new Intent(a, SplashActivity.class)); } @Override -- cgit v1.2.3