From b6e38bd141bb2c798207b5416b73bb92ec12e185 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Sat, 21 Sep 2024 23:39:58 +0400 Subject: [PATCH] fix(recovery): Check server location on recovery for server selection step --- .../server_installation_repository.dart | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/logic/cubit/server_installation/server_installation_repository.dart b/lib/logic/cubit/server_installation/server_installation_repository.dart index dd9bde1f..ae1a1fe5 100644 --- a/lib/logic/cubit/server_installation/server_installation_repository.dart +++ b/lib/logic/cubit/server_installation/server_installation_repository.dart @@ -164,13 +164,14 @@ class ServerInstallationRepository { return RecoveryStep.serverProviderToken; } - /// We don't write anything to the database after .serverSelection - /// step, therefore we have to re-ask it again before prompting for - /// DNS token, if it wasn't provided yet. - if (dnsProviderToken == null) { + if (serverDetails.serverLocation == null) { return RecoveryStep.serverSelection; } + if (dnsProviderToken == null) { + return RecoveryStep.dnsProviderToken; + } + return RecoveryStep.backblazeToken; }