From 232de11cda8b3babc42b4ab8bf0617a2875d7b3d Mon Sep 17 00:00:00 2001 From: Harry <109690906+harry-signal@users.noreply.github.com> Date: Thu, 30 Nov 2023 14:18:27 -0800 Subject: [PATCH] Don't loop provisioning for users without profile names --- Signal/src/AppDelegate.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Signal/src/AppDelegate.swift b/Signal/src/AppDelegate.swift index 1af0f48fd9..1ae7616060 100644 --- a/Signal/src/AppDelegate.swift +++ b/Signal/src/AppDelegate.swift @@ -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.