Using RxApp replace ViewAction

This commit is contained in:
2dust
2025-09-02 17:12:38 +08:00
parent 3f67a23f8b
commit 1a6fbf782d
10 changed files with 87 additions and 93 deletions
@@ -136,8 +136,7 @@ public class BackupAndRestoreViewModel : MyReactiveObject
var result = await CreateZipFileFromDirectory(fileBackup);
if (result)
{
var service = Locator.Current.GetService<MainWindowViewModel>();
await service?.MyAppExitAsync(true);
await AppManager.Instance.AppExitAsync(false);
await SQLiteHelper.Instance.DisposeDbConnectionAsync();
var toPath = Utils.GetConfigPath();
@@ -154,7 +153,7 @@ public class BackupAndRestoreViewModel : MyReactiveObject
_ = ProcUtils.ProcessStart(upgradeFileName, Global.RebootAs, Utils.StartupPath());
}
}
service?.Shutdown(true);
AppManager.Instance.Shutdown(true);
}
else
{