From 59e4e2e4abd8ab913932df57fdd802212f7ca309 Mon Sep 17 00:00:00 2001 From: Davide Date: Fri, 20 Dec 2024 10:37:55 +0100 Subject: [PATCH] Hide profiles until remote repository is ready Regression from #1029 --- Library/Sources/CommonLibrary/Business/ProfileManager.swift | 5 +++-- Passepartout/App/Context/AppContext+Shared.swift | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Library/Sources/CommonLibrary/Business/ProfileManager.swift b/Library/Sources/CommonLibrary/Business/ProfileManager.swift index 048e47dfc..fc8a4b3a3 100644 --- a/Library/Sources/CommonLibrary/Business/ProfileManager.swift +++ b/Library/Sources/CommonLibrary/Business/ProfileManager.swift @@ -125,7 +125,8 @@ public final class ProfileManager: ObservableObject { processor: ProfileProcessor? = nil, repository: ProfileRepository, backupRepository: ProfileRepository? = nil, - mirrorsRemoteRepository: Bool = false + mirrorsRemoteRepository: Bool = false, + readyAfterRemote: Bool = false ) { self.processor = processor self.repository = repository @@ -136,7 +137,7 @@ public final class ProfileManager: ObservableObject { allRemoteProfiles = [:] filteredProfiles = [] requiredFeatures = [:] - if mirrorsRemoteRepository { + if readyAfterRemote { waitingObservers = [.local, .remote] } else { waitingObservers = [.local] diff --git a/Passepartout/App/Context/AppContext+Shared.swift b/Passepartout/App/Context/AppContext+Shared.swift index a38d67c1f..85b605141 100644 --- a/Passepartout/App/Context/AppContext+Shared.swift +++ b/Passepartout/App/Context/AppContext+Shared.swift @@ -108,7 +108,8 @@ extension AppContext { model: cdRemoteModel, observingResults: false ), - mirrorsRemoteRepository: dependencies.mirrorsRemoteRepository + mirrorsRemoteRepository: dependencies.mirrorsRemoteRepository, + readyAfterRemote: true ) let tunnel = ExtendedTunnel(