Show update pin megaphone after AEP without pin registration.

This commit is contained in:
Cody Henthorne
2025-03-03 10:33:13 -05:00
committed by Greyson Parrelli
parent 507d67ee61
commit 0fdcc1c027
4 changed files with 72 additions and 1 deletions

View File

@@ -81,6 +81,7 @@ class AccountValues internal constructor(store: KeyValueStore, context: Context)
private const val KEY_ACI = "account.aci"
private const val KEY_PNI = "account.pni"
private const val KEY_IS_REGISTERED = "account.is_registered"
private const val KEY_ACCOUNT_REGISTERED_AT = "account.registered_at"
private const val KEY_HAS_LINKED_DEVICES = "account.has_linked_devices"
@@ -417,8 +418,20 @@ class AccountValues internal constructor(store: KeyValueStore, context: Context)
if (previous && !registered) {
clearLocalCredentials()
}
if (!previous && registered) {
registeredAtTimestamp = System.currentTimeMillis()
} else if (!registered) {
registeredAtTimestamp = -1
}
}
/**
* Milliseconds since epoch when account was registered or a negative value if not known.
*/
var registeredAtTimestamp: Long by longValue(KEY_ACCOUNT_REGISTERED_AT, -1)
private set
/**
* Function for testing backup/restore
*/