RosePlugs: fix Settings crash, reposition section below Revenge

This commit is contained in:
Ally Founder 2026-08-11 18:11:18 -04:00
parent 9595259886
commit 910364fa30

View file

@ -44,6 +44,7 @@ function buildRendererRow(row: SectionRow) {
IconComponent:
row.icon && TableRowIconModule &&
(() => React.createElement(TableRowIconModule.TableRowIcon, { source: row.icon })),
usePredicate: () => true,
onPress: () => navigateToRow(row),
withArrow: true,
};
@ -140,7 +141,17 @@ function patchTabsUI(getRows: () => SectionRow[], patches: (() => void)[]) {
const rows = getRows();
if (!rows.length || !sections) return;
sections.unshift({ label: SECTION_LABEL, title: SECTION_TITLE, settings: rows.map((r) => r.key) });
const anchorIndex = sections.findIndex((x: any) =>
["Bunny", "Revenge", "Kettu", "Vencore", "ShiggyCord"].some(
(mod) => x.label === mod && x.title === mod
)
);
sections.splice(
anchorIndex >= 0 ? anchorIndex + 1 : 0,
0,
{ label: SECTION_LABEL, title: SECTION_TITLE, settings: rows.map((r) => r.key) }
);
})
);
} catch {
@ -154,7 +165,17 @@ function patchTabsUI(getRows: () => SectionRow[], patches: (() => void)[]) {
const rows = getRows();
if (!rows.length || !sections) return;
sections.unshift({ label: SECTION_LABEL, title: SECTION_TITLE, settings: rows.map((r) => r.key) });
const anchorIndex = sections.findIndex((x: any) =>
["Bunny", "Revenge", "Kettu", "Vencore", "ShiggyCord"].some(
(mod) => x.label === mod && x.title === mod
)
);
sections.splice(
anchorIndex >= 0 ? anchorIndex + 1 : 0,
0,
{ label: SECTION_LABEL, title: SECTION_TITLE, settings: rows.map((r) => r.key) }
);
})
);
}