From 981006e047a8d88a4d766415174ec953c5101b8b Mon Sep 17 00:00:00 2001 From: Tyfon <29051038+tyfon7@users.noreply.github.com> Date: Wed, 3 Jul 2024 00:20:11 -0700 Subject: [PATCH] cleaning up unneeded patch --- Patches/ScrollPatches.cs | 25 ------------------------- 1 file changed, 25 deletions(-) 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;