This repository was archived by the owner on May 17, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
src/lib/ui/settings/patches Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { after } from "@lib/api/patcher" ;
22import { findInReactTree } from "@lib/utils" ;
3- import { i18n } from "@metro/common" ;
43import { TableRow } from "@metro/common/components" ;
54import { findByNameLazy , findByPropsLazy } from "@metro/wrappers" ;
65import { registeredSections } from "@ui/settings" ;
@@ -75,8 +74,8 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) {
7574 if ( useIsFirstRender ( ) ) return ; // :shrug:
7675
7776 const { sections } = findInReactTree ( ret , i => i . props ?. sections ) . props ;
78- // TODO: Use new i18n lib
79- let index = - ~ sections . findIndex ( ( i : any ) => i . label === i18n . Messages . ACCOUNT_SETTINGS ) || 1 ;
77+ // Credit to @palmdevs - https://discord.com/channels/1196075698301968455/1243605828783571024/1307940348378742816
78+ let index = - ~ sections . findIndex ( ( i : any ) => i . settings . includes ( "ACCOUNT" ) ) || 1 ;
8079
8180 Object . keys ( registeredSections ) . forEach ( sect => {
8281 sections . splice ( index ++ , 0 , {
You can’t perform that action at this time.
0 commit comments