Skip to content

Commit cebd5af

Browse files
PalmDevsC0C0B01semantic-release-bot
authored
chore: merge dev to main (#209)
Co-authored-by: cocobo1 <[email protected]> Co-authored-by: semantic-release-bot <[email protected]>
2 parents 1679f97 + 9fa40ae commit cebd5af

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## [1.10.2-dev.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.10.1...v1.10.2-dev.1) (2025-11-14)
2+
3+
4+
### Bug Fixes
5+
6+
* **settings:** add support for discord 306.4+ ([#208](https://github.com/revenge-mod/revenge-bundle/issues/208)) ([0076200](https://github.com/revenge-mod/revenge-bundle/commit/007620028e02511c37bfdfc538e3e5bc03034cde))
7+
18
## [1.10.1](https://github.com/revenge-mod/revenge-bundle/compare/v1.10.0...v1.10.1) (2025-10-18)
29

310

src/lib/ui/settings/patches/tabs.tsx

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import { after } from "@lib/api/patcher";
2-
import { findInReactTree } from "@lib/utils";
32
import { TableRow } from "@metro/common/components";
43
import { findByNameLazy, findByPropsLazy } from "@metro/wrappers";
54
import { registeredSections } from "@ui/settings";
65

76
import { CustomPageRenderer, wrapOnPress } from "./shared";
8-
import { Strings } from "@core/i18n";
9-
import { TableRowIcon } from "@metro/common/components";
7+
import { findInReactTree } from "@lib/utils";
108

119
const settingConstants = findByPropsLazy("SETTING_RENDERER_CONFIG");
10+
const createListModule = findByPropsLazy("createList");
1211
const SettingsOverviewScreen = findByNameLazy("SettingsOverviewScreen", false);
1312

1413
function useIsFirstRender() {
@@ -72,6 +71,29 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) {
7271
});
7372
});
7473

74+
try{
75+
unpatches.push(after("createList", createListModule, function(args, ret) {
76+
const [config] = args;
77+
78+
if (config?.sections && Array.isArray(config.sections)) {
79+
const sections = config.sections;
80+
// Credit to @palmdevs - https://discord.com/channels/1196075698301968455/1243605828783571024/1307940348378742816
81+
let index = -~sections.findIndex((i: any) => i.settings?.includes("ACCOUNT")) || 1;
82+
83+
Object.keys(registeredSections).forEach(sect => {
84+
const alreadyExists = sections.some((s: any) => s.label === sect);
85+
if (!alreadyExists) {
86+
sections.splice(index++, 0, {
87+
label: sect,
88+
title: sect,
89+
settings: registeredSections[sect].map(a => a.key)
90+
});
91+
}
92+
});
93+
}
94+
return ret;
95+
},));
96+
}catch{
7597
unpatches.push(after("default", SettingsOverviewScreen, (_, ret) => {
7698
if (useIsFirstRender()) return; // :shrug:
7799

@@ -87,4 +109,5 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) {
87109
});
88110
});
89111
}));
90-
}
112+
}
113+
};

0 commit comments

Comments
 (0)