fix(plugins): scope settings section injection to top-level SettingsOverview screen

This commit is contained in:
Rosie Val 2026-08-22 12:07:23 -04:00
parent 46d9ce7926
commit 7cb147fe88
2 changed files with 12 additions and 0 deletions

View file

@ -146,6 +146,12 @@ function patchTabsUI(getRows: () => SectionRow[], patches: (() => void)[]) {
const sections = config.sections;
const rows = getRows();
if (!rows.length || !sections) return;
// createList is shared by every settings sub-page; scope to the
// top-level overview screen by call stack.
const stack = new Error().stack ?? "";
if (!stack.includes("SettingsOverviewScreen")) return;
cacheRows(rows);
const anchorIndex = sections.findIndex((x: any) =>

View file

@ -162,6 +162,12 @@ function patchTabsUI(getRows: () => SectionRow[], patches: (() => void)[]) {
const sections = config.sections;
const rows = getRows();
if (!rows.length || !sections) return;
// createList is shared by every settings sub-page; scope to the
// top-level overview screen by call stack.
const stack = new Error().stack ?? "";
if (!stack.includes("SettingsOverviewScreen")) return;
cacheRows(rows);
const anchorIndex = sections.findIndex((x: any) =>