diff --git a/Questionable/Controller/QuestController.cs b/Questionable/Controller/QuestController.cs index d1a7e3e0..46adb25b 100644 --- a/Questionable/Controller/QuestController.cs +++ b/Questionable/Controller/QuestController.cs @@ -278,7 +278,7 @@ internal sealed class QuestController if (_taskQueue.Count > 0) _taskQueue.Clear(); - _yesAlreadyIpc.DisableYesAlready(); + _yesAlreadyIpc.RestoreYesAlready(); } public void Stop(string label, bool continueIfAutomatic = false) diff --git a/Questionable/External/YesAlreadyIpc.cs b/Questionable/External/YesAlreadyIpc.cs index 8b69f789..a9d20c03 100644 --- a/Questionable/External/YesAlreadyIpc.cs +++ b/Questionable/External/YesAlreadyIpc.cs @@ -18,16 +18,22 @@ internal sealed class YesAlreadyIpc : IDisposable public void DisableYesAlready() { - _pluginLog.Debug("Disabling YesAlready"); - if (_pluginInterface.TryGetData>("YesAlready.StopRequests", out var data)) + if (_pluginInterface.TryGetData>("YesAlready.StopRequests", out var data) && + !data.Contains(nameof(Questionable))) + { + _pluginLog.Debug("Disabling YesAlready"); data.Add(nameof(Questionable)); + } } public void RestoreYesAlready() { - _pluginLog.Debug("Restoring YesAlready"); - if (_pluginInterface.TryGetData>("YesAlready.StopRequests", out var data)) + if (_pluginInterface.TryGetData>("YesAlready.StopRequests", out var data) && + data.Contains(nameof(Questionable))) + { + _pluginLog.Debug("Restoring YesAlready"); data.Remove(nameof(Questionable)); + } } public void Dispose() => RestoreYesAlready(); diff --git a/Questionable/Questionable.csproj b/Questionable/Questionable.csproj index e5fdb306..2fc6155c 100644 --- a/Questionable/Questionable.csproj +++ b/Questionable/Questionable.csproj @@ -1,7 +1,7 @@  net8.0-windows - 0.16 + 0.17 12 enable true