mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-26 12:44:38 +00:00
Use server rereg flag to show post reg restore flows.
This commit is contained in:
committed by
Greyson Parrelli
parent
f255160c4a
commit
27ddc97ea4
@@ -16,5 +16,6 @@ data class AccountRegistrationResult(
|
||||
val masterKey: MasterKey?,
|
||||
val pin: String?,
|
||||
val aciPreKeyCollection: PreKeyCollection,
|
||||
val pniPreKeyCollection: PreKeyCollection
|
||||
val pniPreKeyCollection: PreKeyCollection,
|
||||
val reRegistration: Boolean
|
||||
)
|
||||
|
||||
@@ -444,7 +444,8 @@ object RegistrationRepository {
|
||||
masterKey = masterKey,
|
||||
pin = pin,
|
||||
aciPreKeyCollection = aciPreKeyCollection,
|
||||
pniPreKeyCollection = pniPreKeyCollection
|
||||
pniPreKeyCollection = pniPreKeyCollection,
|
||||
reRegistration = accountRegistrationResponse.reregistration
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -479,7 +479,8 @@ object RegistrationRepository {
|
||||
masterKey = masterKey,
|
||||
pin = pin,
|
||||
aciPreKeyCollection = aciPreKeyCollection,
|
||||
pniPreKeyCollection = pniPreKeyCollection
|
||||
pniPreKeyCollection = pniPreKeyCollection,
|
||||
reRegistration = accountRegistrationResponse.reregistration
|
||||
)
|
||||
}
|
||||
|
||||
@@ -536,7 +537,8 @@ object RegistrationRepository {
|
||||
masterKey = MasterKey(message.masterKey!!.toByteArray()),
|
||||
pin = null,
|
||||
aciPreKeyCollection = aciPreKeys,
|
||||
pniPreKeyCollection = pniPreKeys
|
||||
pniPreKeyCollection = pniPreKeys,
|
||||
reRegistration = true
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -909,8 +909,8 @@ class RegistrationViewModel : ViewModel() {
|
||||
Log.w(TAG, "Unable to start auth websocket", e)
|
||||
}
|
||||
|
||||
if (!remoteResult.storageCapable && !SignalStore.account.restoredAccountEntropyPool && SignalStore.registration.restoreDecisionState.isDecisionPending) {
|
||||
Log.v(TAG, "Not storage capable or restored with AEP, and still pending restore decision, likely an account with no data to restore, skipping post register restore")
|
||||
if (!remoteResult.reRegistration && SignalStore.registration.restoreDecisionState.isDecisionPending) {
|
||||
Log.v(TAG, "Not re-registration, and still pending restore decision, likely an account with no data to restore, skipping post register restore")
|
||||
SignalStore.registration.restoreDecisionState = RestoreDecisionState.NewAccount
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user