From e80ab84b7cfe20acefc95954fb54b588eae89b7c Mon Sep 17 00:00:00 2001 From: pylixonly <82711525+pylixonly@users.noreply.github.com> Date: Sat, 16 Nov 2024 12:58:33 +0800 Subject: [PATCH] fix: pass IconComponent for settings section --- src/lib/ui/settings/patches/tabs.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/ui/settings/patches/tabs.tsx b/src/lib/ui/settings/patches/tabs.tsx index 836e533..1c23eab 100644 --- a/src/lib/ui/settings/patches/tabs.tsx +++ b/src/lib/ui/settings/patches/tabs.tsx @@ -1,6 +1,7 @@ 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"; @@ -22,6 +23,7 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { type: "pressable", title: row.title, icon: row.icon, + IconComponent: () => , usePredicate: row.usePredicate, useTrailing: row.useTrailing, onPress: wrapOnPress(row.onPress, null, row.render, row.title()), @@ -73,6 +75,7 @@ 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; Object.keys(registeredSections).forEach(sect => {