fix: Clear serverInstallationWizardData after the wizard is finished

This commit is contained in:
Inex Code 2024-05-15 19:23:39 +03:00
parent e9f13c5471
commit 9e56afba50
2 changed files with 6 additions and 0 deletions

View File

@ -538,5 +538,6 @@ class ServerInstallationRepository {
await getIt<ResourcesModel>().addBackupsCredential(
wizardData.backupsCredential!,
);
await getIt<WizardDataModel>().clearServerInstallation();
}
}

View File

@ -297,6 +297,11 @@ class WizardDataModel {
await _box.put(BNames.serverInstallationWizardData, _serverInstallation);
}
Future<void> clearServerInstallation() async {
_serverInstallation = null;
await _box.delete(BNames.serverInstallationWizardData);
}
Future<void> clear() async {
await _box.clear();
await _box.compact();