Allow importing account-less legacy instances as sources

Legacy v1 instances without an account had no import path after the
switch to explicit account review. Surface them in a separate "Sources"
section of the legacy import view where they can be added with a single
tap (no sign-in) or removed, mirroring the accounts flow. Instances tied
to an account stay in the Accounts section and are not duplicated.

Detection now gates the entry points and first-launch prompt on any
legacy data (accounts or sources), not accounts alone.
This commit is contained in:
Arkadiusz Fal
2026-05-18 23:54:42 +02:00
parent de9b06072d
commit 86fbdd23f1
6 changed files with 382 additions and 57 deletions

View File

@@ -241,7 +241,7 @@ struct AddSourceView: View {
.task {
refreshLegacyAccountsVisibility()
}
.onChange(of: appEnvironment?.legacyMigrationService.legacyAccountsRevision ?? 0) {
.onChange(of: appEnvironment?.legacyMigrationService.legacyDataRevision ?? 0) {
refreshLegacyAccountsVisibility()
}
}
@@ -262,7 +262,7 @@ struct AddSourceView: View {
}
private func refreshLegacyAccountsVisibility() {
hasLegacyAccountsToImport = appEnvironment?.legacyMigrationService.hasLegacyAccountsToImport() == true
hasLegacyAccountsToImport = appEnvironment?.legacyMigrationService.hasLegacyDataToImport() == true
}
}