Dough Git

commit

Hold the splash long enough to see, and name APKs by version

commit
0640c93495009c4676f9f5dfaaec554ed7c116ee
author
Clove Twilight <[email protected]>
date
2026-10-31 08:37
The splash now stays at least 1.5s so its opening plays even when mail is
quick. CI names the APK inbox-<version>.apk, for artifacts and releases.

diff --git a/email/README.md b/email/README.md
index e6506c2..b976361 100644
--- a/email/README.md
+++ b/email/README.md
@@ -68,9 +68,10 @@ changing too.
 ## CI
 
 `.github/workflows/android.yml` (at the repo root) builds whenever `app/`
-changes and uploads `inbox.apk` as an artifact. Each build from `main` replaces
-the rolling `latest` release, and pushing a `v*` tag attaches it to a GitHub
-release of its own. It signs with two repository secrets:
+changes and uploads the APK, named by version (`inbox-1.0.6.apk`), as an
+artifact. Each build from `main` replaces the rolling `latest` release, which
+the site's `/download` link redirects to, and pushing a `v1.2.0` tag attaches
+`inbox-1.2.0.apk` to a GitHub release of its own. It signs with two repository secrets:
 
 - `KEYSTORE_BASE64`: `base64 -w0 inbox.jks`
 - `KEYSTORE_PASSWORD`: the keystore password
diff --git a/email/app/src/main/java/gay/doughmination/mail/MainActivity.kt b/email/app/src/main/java/gay/doughmination/mail/MainActivity.kt
index 0be4e69..fcf001d 100644
--- a/email/app/src/main/java/gay/doughmination/mail/MainActivity.kt
+++ b/email/app/src/main/java/gay/doughmination/mail/MainActivity.kt
@@ -17,12 +17,14 @@ class MainActivity : ComponentActivity() {
     private val vm: MailViewModel by viewModels()
 
     override fun onCreate(savedInstanceState: Bundle?) {
-        // The splash stays up while the inbox loads, so it opens already full.
+        // The splash stays up while the inbox loads, so it opens already full,
+        // and long enough for its opening to play even when mail is quick.
         // A slow connection gets the app (and its spinner) after a few seconds.
         val shown = SystemClock.uptimeMillis()
         installSplashScreen().apply {
             setKeepOnScreenCondition {
-                !vm.ready && SystemClock.uptimeMillis() - shown < SPLASH_MAX_MS
+                val elapsed = SystemClock.uptimeMillis() - shown
+                (!vm.ready || elapsed < SPLASH_MIN_MS) && elapsed < SPLASH_MAX_MS
             }
             // Then it lifts off the top, uncovering the inbox.
             setOnExitAnimationListener { splash ->
@@ -59,6 +61,7 @@ class MainActivity : ComponentActivity() {
     }
 
     private companion object {
+        const val SPLASH_MIN_MS = 1500L
         const val SPLASH_MAX_MS = 4000L
     }
 }