diff --git a/src/lib/ui/settings/index.tsx b/src/lib/ui/settings/index.tsx index 364a34b..0ed95f4 100644 --- a/src/lib/ui/settings/index.tsx +++ b/src/lib/ui/settings/index.tsx @@ -12,8 +12,7 @@ export interface RowConfig { icon?: ImageURISource | number; IconComponent?: React.ReactNode, usePredicate?: () => boolean, - useTrailing?: () => string | JSX.Element, - rawTabsConfig?: Record; + useTrailing?: () => string | JSX.Element } export const registeredSections = {} as { diff --git a/src/lib/ui/settings/patches/tabs.tsx b/src/lib/ui/settings/patches/tabs.tsx index 9623034..027f5b0 100644 --- a/src/lib/ui/settings/patches/tabs.tsx +++ b/src/lib/ui/settings/patches/tabs.tsx @@ -21,14 +21,15 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { .flatMap(sect => sect.map(row => ({ [row.key]: { type: "pressable", + // title was renamed to useTitle, both are here for compatibility (thanks kmiioo) https://codeberg.org/raincord/rain/pulls/52 title: row.title, + useTitle: row.title, icon: row.icon, IconComponent: () => , usePredicate: row.usePredicate, useTrailing: row.useTrailing, onPress: wrapOnPress(row.onPress, null, row.render, row.title()), - withArrow: true, - ...row.rawTabsConfig + withArrow: true } }))) .reduce((a, c) => Object.assign(a, c)); @@ -44,6 +45,7 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { VendettaCustomPage: { type: "route", title: () => "Kettu", + useTitle: () => "Kettu", screen: { route: "VendettaCustomPage", getComponent: () => CustomPageRenderer @@ -52,6 +54,7 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { PUPU_CUSTOM_PAGE: { type: "route", title: () => "Kettu", + useTitle: () => "Kettu", screen: { route: "PUPU_CUSTOM_PAGE", getComponent: () => CustomPageRenderer @@ -60,6 +63,7 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { BUNNY_CUSTOM_PAGE: { type: "route", title: () => "Kettu", + useTitle: () => "Kettu", screen: { route: "BUNNY_CUSTOM_PAGE", getComponent: () => CustomPageRenderer