Fix odd flip-flop behavior
This commit is contained in:
@@ -172,7 +172,7 @@ public sealed unsafe class RecipeNote : Window, IDisposable
|
|||||||
if (Service.Configuration.SuggestMacroAutomatically && SuggestedMacroTask?.Result == null && (SuggestedMacroTask?.Completed ?? true))
|
if (Service.Configuration.SuggestMacroAutomatically && SuggestedMacroTask?.Result == null && (SuggestedMacroTask?.Completed ?? true))
|
||||||
CalculateSuggestedMacro();
|
CalculateSuggestedMacro();
|
||||||
// If we don't want to suggest automatically, we should cancel and clean out the task
|
// If we don't want to suggest automatically, we should cancel and clean out the task
|
||||||
else
|
else if (!Service.Configuration.SuggestMacroAutomatically && SuggestedMacroTask?.Result == null)
|
||||||
{
|
{
|
||||||
SuggestedMacroTask?.Cancel();
|
SuggestedMacroTask?.Cancel();
|
||||||
SuggestedMacroTask = null;
|
SuggestedMacroTask = null;
|
||||||
@@ -182,7 +182,7 @@ public sealed unsafe class RecipeNote : Window, IDisposable
|
|||||||
if (Service.Configuration.ShowCommunityMacros && Service.Configuration.SearchCommunityMacroAutomatically && CommunityMacroTask?.Result == null && (CommunityMacroTask?.Completed ?? true))
|
if (Service.Configuration.ShowCommunityMacros && Service.Configuration.SearchCommunityMacroAutomatically && CommunityMacroTask?.Result == null && (CommunityMacroTask?.Completed ?? true))
|
||||||
CalculateCommunityMacro();
|
CalculateCommunityMacro();
|
||||||
// If we don't want to search automatically, we should cancel and clean out the task
|
// If we don't want to search automatically, we should cancel and clean out the task
|
||||||
else
|
else if (!Service.Configuration.SearchCommunityMacroAutomatically && CommunityMacroTask?.Result == null)
|
||||||
{
|
{
|
||||||
CommunityMacroTask?.Cancel();
|
CommunityMacroTask?.Cancel();
|
||||||
CommunityMacroTask = null;
|
CommunityMacroTask = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user