Temporarily disable auto-deletion of migrated profiles (#1013)

Leave room for downgrade until 3.0.0 is stable.
This commit is contained in:
Davide 2024-12-14 21:58:39 +01:00 committed by GitHub
parent 750b12c4ee
commit b9353a6b02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {