aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/mygram/droid/App.java
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-10-22 12:27:34 +0200
committerDanilo M. <danix@danix.xyz>2026-10-22 12:27:34 +0200
commit899b1d9812c61a33554b67e3026850684e686ce1 (patch)
tree415abc780daa5bd4cbb69d65bdb82157b44cf3ab /app/src/main/java/mygram/droid/App.java
parent48b44a6e27b87ee8bf5340a8d7ff37afaf04b7f9 (diff)
downloadmygram-droid-899b1d9812c61a33554b67e3026850684e686ce1.tar.gz
mygram-droid-899b1d9812c61a33554b67e3026850684e686ce1.zip
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 <noreply@anthropic.com>
Diffstat (limited to 'app/src/main/java/mygram/droid/App.java')
-rw-r--r--app/src/main/java/mygram/droid/App.java8
1 files changed, 4 insertions, 4 deletions
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