From b7d70c2b5309bf8a27371a50b38cb9f81adbf182 Mon Sep 17 00:00:00 2001 From: Oj Date: Thu, 8 Apr 2021 11:20:53 +0100 Subject: [PATCH] [PCCompat > Settings] Change settings placement like new GM v8 --- moduleWrappers/powercord/global/settings.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/moduleWrappers/powercord/global/settings.js b/moduleWrappers/powercord/global/settings.js index eb19955..b390a71 100644 --- a/moduleWrappers/powercord/global/settings.js +++ b/moduleWrappers/powercord/global/settings.js @@ -9,13 +9,12 @@ export const registerSettings = (id, { label, render, category }) => { const FormSection = goosemodScope.webpackModules.findByDisplayName('FormSection'); goosemodScope.patcher.inject(id, SettingsView.prototype, 'getPredicateSections', (_, sections) => { - if (!sections.find(c => c.section === 'changelog')) return sections; - - const dividers = sections.filter(c => c.section === 'DIVIDER'); + const logout = sections.find((c) => c.section === 'logout'); + if (!logout) return sections; const finalLabel = typeof label === 'function' ? label() : label; - sections.splice(sections.indexOf(dividers[dividers.length - 2]) - 2, 0, + sections.splice(sections.indexOf(logout) - 1, 0, { section: finalLabel, label: finalLabel,