From b9353a6b02869f53c3391cabb1b6ecd157ac7078 Mon Sep 17 00:00:00 2001 From: Davide Date: Sat, 14 Dec 2024 21:58:39 +0100 Subject: [PATCH] Temporarily disable auto-deletion of migrated profiles (#1013) Leave room for downgrade until 3.0.0 is stable. --- .../Views/Migration/MigrateView.swift | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Library/Sources/AppUIMain/Views/Migration/MigrateView.swift b/Library/Sources/AppUIMain/Views/Migration/MigrateView.swift index e15a26f3..e74554c8 100644 --- a/Library/Sources/AppUIMain/Views/Migration/MigrateView.swift +++ b/Library/Sources/AppUIMain/Views/Migration/MigrateView.swift @@ -191,16 +191,17 @@ private extension MigrateView { } pp_log(.App.migration, .notice, "Migrated \(migrated.count) profiles") - if !iapManager.isRestricted { - do { - try await migrationManager.deleteMigratableProfiles(withIds: Set(migrated.map(\.id))) - pp_log(.App.migration, .notice, "Discarded \(migrated.count) migrated profiles from old store") - } catch { - pp_log(.App.migration, .error, "Unable to discard migrated profiles: \(error)") - } - } else { + // TODO: ### restore auto-deletion after stable 3.0.0, otherwise users could not downgrade +// if !iapManager.isRestricted { +// do { +// try await migrationManager.deleteMigratableProfiles(withIds: Set(migrated.map(\.id))) +// pp_log(.App.migration, .notice, "Discarded \(migrated.count) migrated profiles from old store") +// } catch { +// pp_log(.App.migration, .error, "Unable to discard migrated profiles: \(error)") +// } +// } else { pp_log(.App.migration, .notice, "Restricted build, do not discard migrated profiles") - } +// } model.step = .migrated(migrated) } catch {