From 4c1a5fc165fccff97f75b9ca266ed98df9cd2259 Mon Sep 17 00:00:00 2001 From: Elvyra <88881326+EepyElvyra@users.noreply.github.com> Date: Mon, 10 Feb 2025 20:00:59 +0100 Subject: [PATCH 1/4] BetterFolders: Fix not disabling expanded folder background (#3214) --- src/plugins/betterFolders/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/betterFolders/index.tsx b/src/plugins/betterFolders/index.tsx index 403dc834..ded8b611 100644 --- a/src/plugins/betterFolders/index.tsx +++ b/src/plugins/betterFolders/index.tsx @@ -185,8 +185,8 @@ export default definePlugin({ { // Decide if we should render the expanded folder background if we are rendering the Better Folders sidebar predicate: () => settings.store.showFolderIcon !== FolderIconDisplay.Always, - match: /(?<=\.isExpanded\),.{0,25}children:\[)/, - replace: "$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)&&" + match: /\.isExpanded\),.{0,30}children:\[/, + replace: "$&$self.shouldShowFolderIconAndBackground(!!arguments[0]?.isBetterFolders,arguments[0]?.betterFoldersExpandedIds)&&" }, { // Decide if we should render the expanded folder icon if we are rendering the Better Folders sidebar From a87b19da2cd24983bbe18372e4409a03ff06c6bc Mon Sep 17 00:00:00 2001 From: Cassie <37855219+CodeF53@users.noreply.github.com> Date: Wed, 12 Feb 2025 15:24:33 -0700 Subject: [PATCH 2/4] fix for SettingsSync DataStore (#149) --- src/utils/settingsSync.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/settingsSync.ts b/src/utils/settingsSync.ts index a31aa621..c4490130 100644 --- a/src/utils/settingsSync.ts +++ b/src/utils/settingsSync.ts @@ -35,11 +35,11 @@ export async function importSettings(data: string) { throw new Error("Failed to parse JSON: " + String(err)); } - if ("settings" in parsed && "quickCss" in parsed && "dataStore" in parsed) { + if ("settings" in parsed && "quickCss" in parsed) { Object.assign(PlainSettings, parsed.settings); await VencordNative.settings.set(parsed.settings); await VencordNative.quickCss.set(parsed.quickCss); - await DataStore.setMany(parsed.dataStore); + if (parsed.dataStore) await DataStore.setMany(parsed.dataStore); } else throw new Error("Invalid Settings. Is this even an Equicord Settings file?"); } From 8ba622b53650aeea7acb11782691cff9245542c8 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Thu, 13 Feb 2025 13:31:05 -0500 Subject: [PATCH 3/4] Fix StatusPresets --- src/equicordplugins/statusPresets/index.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/equicordplugins/statusPresets/index.tsx b/src/equicordplugins/statusPresets/index.tsx index 904f30c3..17684d5c 100644 --- a/src/equicordplugins/statusPresets/index.tsx +++ b/src/equicordplugins/statusPresets/index.tsx @@ -24,12 +24,11 @@ import ErrorBoundary from "@components/ErrorBoundary"; import { EquicordDevs } from "@utils/constants"; import { proxyLazy } from "@utils/lazy"; import { classes } from "@utils/misc"; -import { ModalProps, openModalLazy } from "@utils/modal"; +import { openModalLazy } from "@utils/modal"; import { useForceUpdater } from "@utils/react"; import definePlugin, { OptionType, StartAt } from "@utils/types"; import { extractAndLoadChunksLazy, findByPropsLazy, findComponentByCodeLazy, findModuleId, wreq } from "@webpack"; import { Button, Clickable, Menu, Toasts, UserStore, useState } from "@webpack/common"; -import { FunctionComponent } from "react"; const settings = definePluginSettings({ @@ -62,7 +61,7 @@ const PMenu = findComponentByCodeLazy(".menuItemLabel", ".menuItemInner"); const EmojiComponent = findComponentByCodeLazy(/\.translateSurrogatesToInlineEmoji\(\i.\i\),/); const CustomStatusSettings = getUserSettingLazy("status", "customStatus")!; -const StatsModule: { default: FunctionComponent; } = proxyLazy(() => { +const StatusModule = proxyLazy(() => { const id = findModuleId("this.renderCustomStatusInput()"); return wreq(Number(id)); }); @@ -71,7 +70,9 @@ const requireCustomStatusModal = extractAndLoadChunksLazy(["action:\"PRESS_ADD_C const openCustomStatusModalLazy = () => openModalLazy(async () => { await requireCustomStatusModal(); - return props => ; + const key = Object.keys(StatusModule)[0]; + const Component = StatusModule[key]; + return props => ; }); function getExpirationMs(expiration: "TODAY" | number) { From bfb97040b9e939d705778461c1857ccb36883d72 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Mon, 17 Feb 2025 01:17:55 -0500 Subject: [PATCH 4/4] Fix Typos --- src/plugins/roleColorEverywhere/index.tsx | 2 +- src/plugins/typingTweaks/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/roleColorEverywhere/index.tsx b/src/plugins/roleColorEverywhere/index.tsx index d00016a0..29747d37 100644 --- a/src/plugins/roleColorEverywhere/index.tsx +++ b/src/plugins/roleColorEverywhere/index.tsx @@ -165,7 +165,7 @@ export default definePlugin({ getColorString(userId: string, channelOrGuildId: string) { try { - if (Settings.plugins.customUserColors.enabled) + if (Settings.plugins.CustomUserColors.enabled) return getCustomColorString(userId, true); const guildId = ChannelStore.getChannel(channelOrGuildId)?.guild_id ?? GuildStore.getGuild(channelOrGuildId)?.id; diff --git a/src/plugins/typingTweaks/index.tsx b/src/plugins/typingTweaks/index.tsx index 7991b058..69226e1c 100644 --- a/src/plugins/typingTweaks/index.tsx +++ b/src/plugins/typingTweaks/index.tsx @@ -60,7 +60,7 @@ interface Props { function typingUserColor(guildId: string, userId: string) { if (!settings.store.showRoleColors) return; - if (Settings.plugins.customUserColors.enabled) return getCustomColorString(userId, true); + if (Settings.plugins.CustomUserColors.enabled) return getCustomColorString(userId, true); return GuildMemberStore.getMember(guildId, userId)?.colorString; }