Skip to content

Commit d321571

Browse files
authored
fix: settings crash after discord's settings refactor (#233)
1 parent 3b69547 commit d321571

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/lib/ui/settings/patches/tabs.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) {
2121
.flatMap(sect => sect.map(row => ({
2222
[row.key]: {
2323
type: "pressable",
24+
// title was renamed to useTitle, both are here for compatibility (thanks kmiioo) https://codeberg.org/raincord/rain/pulls/52
25+
useTitle: row.title,
2426
title: row.title,
2527
icon: row.icon,
2628
IconComponent: () => <TableRow.Icon source={row.icon} />,
@@ -43,6 +45,7 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) {
4345
...rendererConfigValue,
4446
VendettaCustomPage: {
4547
type: "route",
48+
useTitle: () => Strings.BUNNY,
4649
title: () => Strings.BUNNY,
4750
screen: {
4851
route: "VendettaCustomPage",
@@ -51,6 +54,7 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) {
5154
},
5255
BUNNY_CUSTOM_PAGE: {
5356
type: "route",
57+
useTitle: () => Strings.BUNNY,
5458
title: () => Strings.BUNNY,
5559
screen: {
5660
route: "BUNNY_CUSTOM_PAGE",

0 commit comments

Comments
 (0)