SHA256
Add real native onboarding/auth/dashboard/tasks/notes/shopping, origin-bound HTTPS and encrypted AndroidKeyStore session persistence. Archive the superseded browser renderer and tests. Verify 10 JVM tests, 6 native API-35 emulator tests, lintDebug/lintRelease and debug/unsigned release APK/AAB builds; the real upstream suite passes 7 tests and exports a nonblank native fixture screenshot. Tink host-tool update removes the old generated-protobuf warning. Full module/visual parity remains explicitly incomplete.
24 lines
560 B
Kotlin
24 lines
560 B
Kotlin
package community.yuvomi.mobile
|
|
|
|
/** Never delivers a late system-picker result into a different server/web context. */
|
|
class SelectionGate {
|
|
private var owner: Int? = null
|
|
val outstanding: Boolean get() = owner != null
|
|
|
|
fun begin(generation: Int): Boolean {
|
|
if (outstanding) return false
|
|
owner = generation
|
|
return true
|
|
}
|
|
|
|
fun consume(generation: Int): Boolean {
|
|
val previous = owner
|
|
owner = null
|
|
return previous == generation
|
|
}
|
|
|
|
fun restoreOutstanding() {
|
|
owner = -1
|
|
}
|
|
}
|