Windows 0.3.7 updater exit and Windows session cleanup reliability; no private history or other platform changes

This commit is contained in:
2026-11-07 04:05:04 +00:00
parent ac40dd3a6c
commit 1590443809
15 changed files with 608 additions and 80 deletions
+16
View File
@@ -0,0 +1,16 @@
namespace UCVL.VPNPlus;
// The confirmation dialog runs a nested message loop. Shutdown may win while
// it is open, or while the package is downloading; never launch afterwards.
internal static class ClientUpdateFlow
{
internal static async Task<bool> RunAsync(Func<bool> isCurrent, Func<bool> confirm,
Func<Task<string>> download, Action<string> launch)
{
if (!isCurrent() || !confirm() || !isCurrent()) return false;
var installer = await download();
if (!isCurrent()) return false;
launch(installer);
return true;
}
}