From ba20db27d9ca9d85655c5c7124db4ff20d83b626 Mon Sep 17 00:00:00 2001 From: Jack <30497388+FieryFlames@users.noreply.github.com> Date: Mon, 3 Apr 2023 21:20:42 -0400 Subject: [PATCH] [Hotfix] Hide install theme when loader does not support themes (#47) --- src/ui/quickInstall/forumPost.tsx | 2 +- src/ui/quickInstall/url.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/quickInstall/forumPost.tsx b/src/ui/quickInstall/forumPost.tsx index 96789f2..7d41064 100644 --- a/src/ui/quickInstall/forumPost.tsx +++ b/src/ui/quickInstall/forumPost.tsx @@ -23,7 +23,7 @@ export default () => after("default", ForumPostLongPressActionSheet, ([{ thread let postType: string; if (thread.parent_id === PLUGINS_CHANNEL_ID) { postType = "Plugin"; - } else if (thread.parent_id === THEMES_CHANNEL_ID) { + } else if (thread.parent_id === THEMES_CHANNEL_ID && window.__vendetta_loader?.features.themes) { postType = "Theme"; } else return; diff --git a/src/ui/quickInstall/url.ts b/src/ui/quickInstall/url.ts index cb379c5..8118f12 100644 --- a/src/ui/quickInstall/url.ts +++ b/src/ui/quickInstall/url.ts @@ -14,7 +14,7 @@ export default () => after("showSimpleActionSheet", showSimpleActionSheet, ([{ k let urlType: string; if (url.startsWith(PROXY_PREFIX)) { urlType = "Plugin"; - } else if (url.endsWith(".json")) { + } else if (url.endsWith(".json") && window.__vendetta_loader?.features.themes) { urlType = "Theme"; } else return;