fix(plugins): scope settings section injection to top-level SettingsOverview screen
This commit is contained in:
parent
46d9ce7926
commit
7cb147fe88
2 changed files with 12 additions and 0 deletions
|
|
@ -146,6 +146,12 @@ function patchTabsUI(getRows: () => SectionRow[], patches: (() => void)[]) {
|
||||||
const sections = config.sections;
|
const sections = config.sections;
|
||||||
const rows = getRows();
|
const rows = getRows();
|
||||||
if (!rows.length || !sections) return;
|
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);
|
cacheRows(rows);
|
||||||
|
|
||||||
const anchorIndex = sections.findIndex((x: any) =>
|
const anchorIndex = sections.findIndex((x: any) =>
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,12 @@ function patchTabsUI(getRows: () => SectionRow[], patches: (() => void)[]) {
|
||||||
const sections = config.sections;
|
const sections = config.sections;
|
||||||
const rows = getRows();
|
const rows = getRows();
|
||||||
if (!rows.length || !sections) return;
|
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);
|
cacheRows(rows);
|
||||||
|
|
||||||
const anchorIndex = sections.findIndex((x: any) =>
|
const anchorIndex = sections.findIndex((x: any) =>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue