fix: 修复不保存的关机选项不生效的问题

This commit is contained in:
MistEO
2023-01-24 22:35:27 +08:00
parent ba6f57acc8
commit 2fa15e1e4d

View File

@@ -81,13 +81,6 @@ namespace MaaWpfGui
return ActionType.DoNothing;
}
if (action == ActionType.HibernateWithoutPersist || action == ActionType.ExitEmulatorAndSelfAndHibernateWithoutPersist
|| action == ActionType.ShutdownWithoutPersist)
{
_actionAfterCompleted = ActionType.DoNothing.ToString();
return ActionType.DoNothing;
}
return action;
}
@@ -95,6 +88,13 @@ namespace MaaWpfGui
{
string storeValue = value.ToString();
SetAndNotify(ref _actionAfterCompleted, storeValue);
if (value == ActionType.HibernateWithoutPersist || value == ActionType.ExitEmulatorAndSelfAndHibernateWithoutPersist
|| value == ActionType.ShutdownWithoutPersist)
{
storeValue = ActionType.DoNothing.ToString();
}
ViewStatusStorage.Set("MainFunction.ActionAfterCompleted", storeValue);
}
}