From 4301ed889d59d34f7b3364dfc9fc401cf412eae7 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 13 Aug 2024 01:50:17 -0300 Subject: [PATCH 01/19] Fix ShowHiddenThings feature & PauseInvitesForever --- src/plugins/pauseInvitesForever/index.tsx | 7 +------ src/plugins/showHiddenThings/index.ts | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/plugins/pauseInvitesForever/index.tsx b/src/plugins/pauseInvitesForever/index.tsx index 3f1ce6bf5..666f0af8e 100644 --- a/src/plugins/pauseInvitesForever/index.tsx +++ b/src/plugins/pauseInvitesForever/index.tsx @@ -19,16 +19,11 @@ import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; -import { findLazy } from "@webpack"; import { Constants, GuildStore, i18n, RestAPI } from "@webpack/common"; -const InvitesDisabledExperiment = findLazy(m => m.definition?.id === "2022-07_invites_disabled"); - function showDisableInvites(guildId: string) { - // Once the experiment is removed, this should keep working - const { enableInvitesDisabled } = InvitesDisabledExperiment?.getCurrentConfig?.({ guildId }) ?? { enableInvitesDisabled: true }; // @ts-ignore - return enableInvitesDisabled && !GuildStore.getGuild(guildId).hasFeature("INVITES_DISABLED"); + return !GuildStore.getGuild(guildId).hasFeature("INVITES_DISABLED"); } function disableInvites(guildId: string) { diff --git a/src/plugins/showHiddenThings/index.ts b/src/plugins/showHiddenThings/index.ts index f01dc2107..9ffaa7e14 100644 --- a/src/plugins/showHiddenThings/index.ts +++ b/src/plugins/showHiddenThings/index.ts @@ -51,7 +51,7 @@ export default definePlugin({ }, }, { - find: "2022-07_invites_disabled", + find: "INVITES_DISABLED))||", predicate: () => settings.store.showInvitesPaused, replacement: { match: /\i\.\i\.can\(\i\.\i.MANAGE_GUILD,\i\)/, From d388aa4347cc11a7dc81a375d562629417432300 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 14 Aug 2024 19:34:59 -0300 Subject: [PATCH 02/19] Decor: Fix on current user area --- src/plugins/decor/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/decor/index.tsx b/src/plugins/decor/index.tsx index fe1f6dcbe..c6cd895f9 100644 --- a/src/plugins/decor/index.tsx +++ b/src/plugins/decor/index.tsx @@ -91,7 +91,7 @@ export default definePlugin({ replacement: [ // Use Decor avatar decoration hook { - match: /(?<=\i\)\({avatarDecoration:)(\i).avatarDecoration(?=,)/, + match: /(?<=\i\)\({avatarDecoration:)(\i)(?=,)(?<=currentUser:(\i).+?)/, replace: "$self.useUserDecorAvatarDecoration($1)??$&" } ] From eaca14bb5a970073bc3175a5c46791e3a7b77514 Mon Sep 17 00:00:00 2001 From: HAHALOSAH <67280050+HAHALOSAH@users.noreply.github.com> Date: Fri, 16 Aug 2024 21:30:34 -0700 Subject: [PATCH 03/19] Fix Online Themes tab (#2786) --- src/components/VencordSettings/ThemesTab.tsx | 7 ++----- src/components/VencordSettings/settingsStyles.css | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/components/VencordSettings/ThemesTab.tsx b/src/components/VencordSettings/ThemesTab.tsx index aa8761d76..bb9d37894 100644 --- a/src/components/VencordSettings/ThemesTab.tsx +++ b/src/components/VencordSettings/ThemesTab.tsx @@ -25,10 +25,9 @@ import { openPluginModal } from "@components/PluginSettings/PluginModal"; import type { UserThemeHeader } from "@main/themes"; import { openInviteModal } from "@utils/discord"; import { Margins } from "@utils/margins"; -import { classes } from "@utils/misc"; import { showItemInFolder } from "@utils/native"; import { useAwaiter } from "@utils/react"; -import { findByPropsLazy, findLazy } from "@webpack"; +import { findLazy } from "@webpack"; import { Card, Forms, React, showToast, TabBar, TextArea, useEffect, useRef, useState } from "@webpack/common"; import type { ComponentType, Ref, SyntheticEvent } from "react"; @@ -45,9 +44,7 @@ type FileInput = ComponentType<{ filters?: { name?: string; extensions: string[]; }[]; }>; -const InviteActions = findByPropsLazy("resolveInvite"); const FileInput: FileInput = findLazy(m => m.prototype?.activateUploadDialogue && m.prototype.setRef); -const TextAreaProps = findLazy(m => typeof m.textarea === "string"); const cl = classNameFactory("vc-settings-theme-"); @@ -306,7 +303,7 @@ function ThemesTab() {