Don't loop provisioning for users without profile names

This commit is contained in:
Harry 2023-11-30 14:18:27 -08:00 committed by GitHub
parent c2a76513f4
commit 232de11cda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -465,10 +465,13 @@ extension AppDelegate {
regLoader.restoreLastMode(transaction: tx.asV2Read)
)
}
let needsOnboarding = !hasProfileName && (tsRegistrationState.isPrimaryDevice ?? true)
if let lastMode {
Logger.info("Found ongoing registration; continuing")
return .registration(regLoader, lastMode)
} else if !(hasProfileName && tsRegistrationState.isRegistered) {
} else if needsOnboarding || !tsRegistrationState.isRegistered {
if UIDevice.current.isIPad {
if tsRegistrationState == .delinked {
// If we are delinked, go to the chat list in the delinked state.