https://github.com/2dust/v2rayN/issues/6160
This commit is contained in:
2dust
2024-11-29 11:31:22 +08:00
parent 558e5bb340
commit 1ff4839be1
2 changed files with 12 additions and 2 deletions

View File

@@ -21,6 +21,7 @@ namespace v2rayN.Desktop.Views
private WindowNotificationManager? _manager;
private CheckUpdateView? _checkUpdateView;
private BackupAndRestoreView? _backupAndRestoreView;
private bool _blCloseByUser = false;
public MainWindow()
{
@@ -279,6 +280,11 @@ namespace v2rayN.Desktop.Views
protected override async void OnClosing(WindowClosingEventArgs e)
{
if (_blCloseByUser)
{
return;
}
Logging.SaveLog("OnClosing -> " + e.CloseReason.ToString());
switch (e.CloseReason)
@@ -374,6 +380,8 @@ namespace v2rayN.Desktop.Views
{
return;
}
_blCloseByUser = true;
StorageUI();
await ViewModel?.MyAppExitAsync(false);