From 851b0c796b6c8ca1ce19afa633df471bf053b998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Fern=C3=A1ndez?= Date: Fri, 6 Sep 2024 23:02:07 +0200 Subject: [PATCH] fix: dependency cycle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Blurhashes are going to be cached soon, so it's simpler to just remove the watcher for now and call it a day Signed-off-by: Fernando Fernández --- frontend/src/plugins/workers/index.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/frontend/src/plugins/workers/index.ts b/frontend/src/plugins/workers/index.ts index 222e1a31f0d..46f868b40e2 100644 --- a/frontend/src/plugins/workers/index.ts +++ b/frontend/src/plugins/workers/index.ts @@ -1,12 +1,10 @@ import { wrap } from 'comlink'; -import { watch } from 'vue'; import type { IBlurhashDecoder } from './blurhash-decoder.worker'; import BlurhashDecoder from './blurhash-decoder.worker?worker'; import type { ICanvasDrawer } from './canvas-drawer.worker'; import CanvasDrawer from './canvas-drawer.worker?worker'; import type { IGenericWorker } from './generic.worker'; import GenericWorker from './generic.worker?worker'; -import { remote } from '@/plugins/remote'; /** * A worker for decoding blurhash strings into pixels @@ -33,15 +31,3 @@ export const canvasDrawer = wrap(new CanvasDrawer()); * blocking the main thread */ export const genericWorker = wrap(new GenericWorker()); - -/** - * Clear cached blurhashes on logout - */ -watch( - () => remote.auth.currentUser, - async () => { - if (remote.auth.currentUser === undefined) { - await blurhashDecoder.clearCache(); - } - }, { flush: 'post' } -);