chore: merge dev to main (#65)

This commit is contained in:
Palm 2025-02-14 21:28:48 +07:00 • committed by GitHub
commit 5513b51c27
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,10 @@
## [1.7.1-dev.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.7.0...v1.7.1-dev.1) (2025-02-14)
### Bug Fixes
* **settings:** update tab index lookup approach ([93c17e8](https://github.com/revenge-mod/revenge-bundle/commit/93c17e8e0c8597104d147d94da71078d6e368135))
# [1.7.0](https://github.com/revenge-mod/revenge-bundle/compare/v1.6.0...v1.7.0) (2025-02-02)

View file

@ -1,6 +1,5 @@
import { after } from "@lib/api/patcher";
import { findInReactTree } from "@lib/utils";
import { i18n } from "@metro/common";
import { TableRow } from "@metro/common/components";
import { findByNameLazy, findByPropsLazy } from "@metro/wrappers";
import { registeredSections } from "@ui/settings";
@ -77,8 +76,8 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) {
if (useIsFirstRender()) return; // :shrug:
const { sections } = findInReactTree(ret, i => i.props?.sections).props;
// TODO: Use new i18n lib
let index = -~sections.findIndex((i: any) => i.label === i18n.Messages.ACCOUNT_SETTINGS) || 1;
// Credit to @palmdevs - https://discord.com/channels/1196075698301968455/1243605828783571024/1307940348378742816
let index = -~sections.findIndex((i: any) => i.settings.includes("ACCOUNT")) || 1;
Object.keys(registeredSections).forEach(sect => {
sections.splice(index++, 0, {