From b68fb216527c4426b6fbbfc85325bdc624c51c24 Mon Sep 17 00:00:00 2001 From: Davide De Rosa Date: Wed, 4 May 2022 09:12:06 +0200 Subject: [PATCH] Fix duplicate on iOS 14 Wrong braces in 4cb18965c9f5898f30802226a71e35056209de37. --- .../PassepartoutProfiles/Managers/ProfileManager.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PassepartoutCore/Sources/PassepartoutProfiles/Managers/ProfileManager.swift b/PassepartoutCore/Sources/PassepartoutProfiles/Managers/ProfileManager.swift index ab16e98a..0c93f357 100644 --- a/PassepartoutCore/Sources/PassepartoutProfiles/Managers/ProfileManager.swift +++ b/PassepartoutCore/Sources/PassepartoutProfiles/Managers/ProfileManager.swift @@ -263,13 +263,13 @@ extension ProfileManager { // profile that has not been persisted yet // if setAsCurrent { + pendingProfiles[copy.id] = copy if #available(iOS 15, *) { - pendingProfiles[copy.id] = copy currentProfileId = copy.id - pendingProfiles.removeValue(forKey: copy.id) } else { setCurrentProfile(copy) } + pendingProfiles.removeValue(forKey: copy.id) } else { strategy.saveProfile(copy) }