diff --git a/MultiSelect.cs b/MultiSelect.cs index c5798dd..ffd0725 100644 --- a/MultiSelect.cs +++ b/MultiSelect.cs @@ -33,7 +33,6 @@ namespace UIFixes // Grab the selection objects from ragfair as templates RagfairNewOfferItemView ragfairNewOfferItemView = ItemViewFactory.CreateFromPool("ragfair_layout"); - if (SelectedMarkTemplate == null) { SelectedMarkTemplate = UnityEngine.Object.Instantiate(ragfairNewOfferItemView.R().SelectedMark, null, false); @@ -271,6 +270,7 @@ namespace UIFixes taskSerializer.Initialize( SortedItemContexts().Where(ic => InteractionAvailable(ic, EItemInfoButton.Equip, itemUiContext)), itemContext => itemUiContext.QuickEquip(itemContext.Item)); + itemUiContext.Tooltip?.Close(); } } @@ -283,6 +283,7 @@ namespace UIFixes taskSerializer.Initialize( SortedItemContexts().Where(ic => InteractionAvailable(ic, EItemInfoButton.Unequip, itemUiContext)), itemContext => itemUiContext.Uninstall(itemContext.GClass2813_0)); + itemUiContext.Tooltip?.Close(); } } diff --git a/Patches/StackMoveGreedyPatches.cs b/Patches/StackMoveGreedyPatches.cs index 67339cb..797b050 100644 --- a/Patches/StackMoveGreedyPatches.cs +++ b/Patches/StackMoveGreedyPatches.cs @@ -1,7 +1,6 @@ using Aki.Reflection.Patching; using EFT.UI.DragAndDrop; using HarmonyLib; -using System.Collections.Generic; using System.Reflection; using System.Threading; using System.Threading.Tasks; @@ -75,9 +74,9 @@ namespace UIFixes // This won't block the first action from swapping, but will prevent follow up swaps SwapPatches.BlockSwaps = true; - __result.ContinueWith(_ => - { - InPatch = false; + __result.ContinueWith(_ => + { + InPatch = false; SwapPatches.BlockSwaps = false; }); diff --git a/TaskSerializer.cs b/TaskSerializer.cs index b5674f1..0d9e24b 100644 --- a/TaskSerializer.cs +++ b/TaskSerializer.cs @@ -31,6 +31,11 @@ namespace UIFixes Complete(); } + public void OnDisable() + { + Cancel(); + } + public void LateUpdate() { if (currentTask.IsCanceled)