diff --git a/Patches/ScrollPatches.cs b/Patches/ScrollPatches.cs index 60eb837..91684ee 100644 --- a/Patches/ScrollPatches.cs +++ b/Patches/ScrollPatches.cs @@ -26,7 +26,6 @@ namespace UIFixes new MouseScrollingSpeedPatch().Enable(); new EnhanceHideoutScrollingPatch().Enable(); new EnhanceTaskListScrollingPatch().Enable(); - new RememberTaskListScrollPositionPatch().Enable(); new OpenLastTaskPatch().Enable(); } @@ -336,30 +335,6 @@ namespace UIFixes } } - public class RememberTaskListScrollPositionPatch : ModulePatch - { - private static float ScrollPosition = 1f; - - protected override MethodBase GetTargetMethod() - { - return AccessTools.Method(typeof(TasksScreen), nameof(TasksScreen.Show)); - } - - [PatchPostfix] - public static void Postfix(TasksScreen __instance, ScrollRect ____scrollRect) - { - ____scrollRect.verticalNormalizedPosition = ScrollPosition; - - ____scrollRect.onValueChanged.AddListener(UpdateScrollPosition); - __instance.R().UI.AddDisposable(() => ____scrollRect.onValueChanged.RemoveListener(UpdateScrollPosition)); - } - - private static void UpdateScrollPosition(Vector2 position) - { - ScrollPosition = position.y; - } - } - public class OpenLastTaskPatch : ModulePatch { private static string LastQuestId = null;