From 394a3f9c52129f50ed1326099fcda2aaf3e6848a Mon Sep 17 00:00:00 2001 From: DecafDev <40307803+decaf-dev@users.noreply.github.com> Date: Thu, 1 Aug 2024 13:09:37 -0600 Subject: [PATCH] fix: clear social media cache for compatability --- src/main.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.ts b/src/main.ts index f9c1d2c..b3b8d38 100644 --- a/src/main.ts +++ b/src/main.ts @@ -18,6 +18,7 @@ import { moveFocus } from "./focus-utils"; import { PluginEvent } from "./event/types"; import { isVersionLessThan } from "./utils"; import License from "./svelte/shared/services/license"; +import { clearSocialMediaImageCache } from "./svelte/app/services/social-media-image-cache"; export default class VaultExplorerPlugin extends Plugin { settings: VaultExplorerPluginSettings = DEFAULT_SETTINGS; @@ -188,6 +189,9 @@ export default class VaultExplorerPlugin extends Plugin { "vault-explorer-license-key"; localStorage.removeItem(LOCAL_STORAGE_LICENSE_KEY); } + if (isVersionLessThan(loadedVersion, "1.37.1")) { + await clearSocialMediaImageCache(); + } } }