From d716727e45d7e37be6cfdd3728204b5a5a058e0f Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 11 Dec 2025 00:45:45 +0100 Subject: [PATCH 1/2] fix settings - again --- src/plugins/_core/settings.tsx | 49 +++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/src/plugins/_core/settings.tsx b/src/plugins/_core/settings.tsx index e107ca9cb..6bd2e6ca4 100644 --- a/src/plugins/_core/settings.tsx +++ b/src/plugins/_core/settings.tsx @@ -35,7 +35,7 @@ let LayoutTypes = { PANEL: 3, PANE: 4 }; -waitFor(["SECTION", "SIDEBAR_ITEM", "PANEL", "PANE"], v => LayoutTypes = v); +waitFor(["SECTION", "SIDEBAR_ITEM", "PANEL"], v => LayoutTypes = v); const FallbackSectionTypes = { HEADER: "HEADER", @@ -164,6 +164,34 @@ export default definePlugin({ buildEntry(options: EntryOptions): SettingsLayoutNode { const { key, title, panelTitle = title, Component, Icon } = options; + const panel: SettingsLayoutNode = { + key: key + "_panel", + type: LayoutTypes.PANEL, + useTitle: () => panelTitle, + }; + + const render = { + // FIXME + StronglyDiscouragedCustomComponent: () => , + render: () => , + }; + + // FIXME + if (LayoutTypes.PANE) { + panel.buildLayout = () => [ + { + key: key + "_pane", + type: LayoutTypes.PANE, + useTitle: () => panelTitle, + buildLayout: () => [], + ...render + } + ]; + } else { + Object.assign(panel, render); + panel.buildLayout = () => []; + } + return ({ key, type: LayoutTypes.SIDEBAR_ITEM, @@ -172,24 +200,7 @@ export default definePlugin({ getLegacySearchKey: () => title.toUpperCase(), useTitle: () => title, icon: () => , - buildLayout: () => [ - { - key: key + "_panel", - type: LayoutTypes.PANEL, - useTitle: () => panelTitle, - buildLayout: () => [ - { - key: key + "_pane", - type: LayoutTypes.PANE, - buildLayout: () => [], - // FIXME - StronglyDiscouragedCustomComponent: () => , - render: () => , - useTitle: () => panelTitle - } - ] - } - ] + buildLayout: () => [panel] }); }, From 6e11973a3072b0ac0712d1fb5b2028bbf01102dd Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 11 Dec 2025 00:53:39 +0100 Subject: [PATCH 2/2] fix FavEmojiFirst & a SHC feature --- src/plugins/favEmojiFirst/index.ts | 2 +- src/plugins/showHiddenChannels/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/favEmojiFirst/index.ts b/src/plugins/favEmojiFirst/index.ts index e9a9bc583..8d8172900 100644 --- a/src/plugins/favEmojiFirst/index.ts +++ b/src/plugins/favEmojiFirst/index.ts @@ -50,7 +50,7 @@ export default definePlugin({ }, { - find: "numLockedEmojiResults:", + find: "numEmojiResults:", replacement: [ // set maxCount to Infinity so our sortEmojis callback gets the entire list, not just the first 10 // and remove Discord's emojiResult slice, storing the endIndex on the array for us to use later diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 2cbd9552a..dd17ebac0 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -317,7 +317,7 @@ export default definePlugin({ ] }, { - find: '="interactive-normal",overflowCountClassName:', + find: '="interactive-text-default",overflowCountClassName:', replacement: [ { // Create a variable for the channel prop