From bb2c61e425cefcc81c233ab4058676e2321a2950 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Fri, 11 Mar 2022 09:22:16 -0600 Subject: [PATCH] Removed setupAutoReset --- src/features/reset.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/features/reset.ts b/src/features/reset.ts index bdf86cb..9576e4e 100644 --- a/src/features/reset.ts +++ b/src/features/reset.ts @@ -12,7 +12,7 @@ import Decimal from "lib/break_eternity"; import { Computable, GetComputableType, processComputable } from "util/computed"; import { createLazyProxy } from "util/proxies"; import { Unsubscribe } from "nanoevents"; -import { computed, isRef, unref } from "vue"; +import { isRef, unref } from "vue"; export const ResetType = Symbol("Reset"); @@ -69,19 +69,6 @@ export function createReset( }); } -export function setupAutoReset( - layer: GenericLayer, - reset: GenericReset, - autoActive: Computable = true -): Unsubscribe { - const isActive = typeof autoActive === "function" ? computed(autoActive) : autoActive; - return layer.on("update", () => { - if (unref(isActive)) { - reset.reset(); - } - }); -} - const listeners: Record = {}; export function trackResetTime(layer: GenericLayer, reset: GenericReset): PersistentRef { const resetTime = persistent(new Decimal(0));