diff --git a/Passepartout/Library/Sources/CommonLibrary/Business/ProfileManager.swift b/Passepartout/Library/Sources/CommonLibrary/Business/ProfileManager.swift index fa8c43dd..043443b4 100644 --- a/Passepartout/Library/Sources/CommonLibrary/Business/ProfileManager.swift +++ b/Passepartout/Library/Sources/CommonLibrary/Business/ProfileManager.swift @@ -352,7 +352,7 @@ extension ProfileManager { let newRepository = remoteRepositoryBlock(isRemoteImportingEnabled) let initialProfiles = try await newRepository.fetchProfiles() - reloadRemoteProfiles(initialProfiles, importing: false) + reloadRemoteProfiles(initialProfiles) remoteRepository = newRepository remoteRepository? @@ -360,7 +360,7 @@ extension ProfileManager { .dropFirst() .receive(on: DispatchQueue.main) .sink { [weak self] in - self?.reloadRemoteProfiles($0, importing: true) + self?.reloadRemoteProfiles($0) } .store(in: &remoteSubscriptions) } @@ -393,7 +393,7 @@ private extension ProfileManager { } } - func reloadRemoteProfiles(_ result: [Profile], importing: Bool) { + func reloadRemoteProfiles(_ result: [Profile]) { pp_log(.App.profiles, .info, "Reload remote profiles: \(result.map(\.id))") allRemoteProfiles = result.reduce(into: [:]) { $0[$1.id] = $1 @@ -402,10 +402,6 @@ private extension ProfileManager { waitingObservers.remove(.remote) } - guard importing else { - return - } - Task.detached { [weak self] in guard let self else { return