From 752d1c9b1103c67a1d8ae55c54ae1705dd80df19 Mon Sep 17 00:00:00 2001 From: kmmiio99o Date: Thu, 7 May 2026 13:32:11 +0200 Subject: [PATCH 1/8] feat: remove messagefix was causing issues with freemoji plugin --- src/core/plugins/index.ts | 1 - src/core/plugins/messagefix/index.ts | 58 ---------------------------- 2 files changed, 59 deletions(-) delete mode 100644 src/core/plugins/messagefix/index.ts diff --git a/src/core/plugins/index.ts b/src/core/plugins/index.ts index 1545ea5..25f15cd 100644 --- a/src/core/plugins/index.ts +++ b/src/core/plugins/index.ts @@ -34,7 +34,6 @@ export const getCorePlugins = (): CorePluginRecord => ({ "bunny.quickinstall": makeLazyPlugin(() => require("./quickinstall"), true), "bunny.badges": makeLazyPlugin(() => require("./badges")), "bunny.notrack": makeLazyPlugin(() => require("./notrack")), - "bunny.messagefix": makeLazyPlugin(() => require("./messagefix")), "bunny.fixembed": makeLazyPlugin(() => require("./fixembed")), }); diff --git a/src/core/plugins/messagefix/index.ts b/src/core/plugins/messagefix/index.ts deleted file mode 100644 index 0efa77d..0000000 --- a/src/core/plugins/messagefix/index.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { defineCorePlugin } from ".."; -import { findByProps } from "@metro"; -import { logger } from "@lib/utils/logger"; - -// Find the MessageActions module -const MessageActions = findByProps("sendMessage"); -let originalSendMessage: Function; - -export default defineCorePlugin({ - manifest: { - id: "bunny.messagefix", - version: "1.0.0", - type: "plugin", - spec: 3, - main: "", - display: { - name: "MessageFix", - description: "Ensures messages include the required nonce parameter", - authors: [{ name: "Win8.1VMUser (plugin by ShiggyCord Team)" }], - }, - }, - - start() { - // Save original function - originalSendMessage = MessageActions.sendMessage; - - // Replace with our implementation - MessageActions.sendMessage = function ( - channelId: unknown, - message: unknown, - replyRef: unknown, - options: Record, - ) { - // Ensure options exists and has a nonce - options = options || {}; - if (!options.nonce) { - options.nonce = (BigInt(Date.now() - 1420070400000) << 22n).toString(); - } - - // Call original with fixed parameters - return (originalSendMessage as Function).call( - this, - channelId, - message, - replyRef, - options, - ); - }; - - logger.log("MessageFix: Enabled - adding nonce to all messages"); - }, - - stop() { - // Restore original function - if (originalSendMessage) MessageActions.sendMessage = originalSendMessage; - logger.log("MessageFix: Disabled"); - }, -}); From 03ccabfb5c46dd85d9b203e6723a36e6a29b4e49 Mon Sep 17 00:00:00 2001 From: kmmiio99o Date: Thu, 7 May 2026 14:34:03 +0200 Subject: [PATCH 2/8] fix: settings crashing when opening them happens on 329203+ versions --- src/lib/ui/settings/patches/tabs.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/lib/ui/settings/patches/tabs.tsx b/src/lib/ui/settings/patches/tabs.tsx index 959f24f..0e411e1 100644 --- a/src/lib/ui/settings/patches/tabs.tsx +++ b/src/lib/ui/settings/patches/tabs.tsx @@ -29,6 +29,9 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { IconComponent: () => , usePredicate: row.usePredicate, useTrailing: row.useTrailing, + useTitle: row.title, + useBadge: () => undefined, + useIcon: () => row.icon, onPress: wrapOnPress(row.onPress, null, row.render, row.title()), withArrow: true, ...row.rawTabsConfig, @@ -48,6 +51,10 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { VendettaCustomPage: { type: "route", title: () => "ShiggyCord", + useTitle: () => "ShiggyCord", + useIcon: () => undefined, + useBadge: () => undefined, + IconComponent: () => undefined, screen: { route: "VendettaCustomPage", getComponent: () => CustomPageRenderer, @@ -56,6 +63,10 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { SHIGGYCORD_CUSTOM_PAGE: { type: "route", title: () => "ShiggyCord", + useTitle: () => "ShiggyCord", + useIcon: () => undefined, + useBadge: () => undefined, + IconComponent: () => undefined, screen: { route: "SHIGGYCORD_CUSTOM_PAGE", getComponent: () => CustomPageRenderer, @@ -64,6 +75,10 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { BUNNY_CUSTOM_PAGE: { type: "route", title: () => "ShiggyCord", + useTitle: () => "ShiggyCord", + useIcon: () => undefined, + useBadge: () => undefined, + IconComponent: () => undefined, screen: { route: "BUNNY_CUSTOM_PAGE", getComponent: () => CustomPageRenderer, From de84964ff17034c7e021a70dfdc5931ad1cedb50 Mon Sep 17 00:00:00 2001 From: kmmiio99o Date: Thu, 7 May 2026 14:38:05 +0200 Subject: [PATCH 3/8] bump to 1.4.1.4 --- scripts/build.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build.mjs b/scripts/build.mjs index 07b47bf..ba8d87e 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -75,7 +75,7 @@ const config = { constModules: { globals: { "bunny-build-info": { - version: `"1.4.1.3"`, + version: `"1.4.1.4"`, }, }, }, From 727603ff46c443017e0785442a54987e94992c5d Mon Sep 17 00:00:00 2001 From: cocobo1 Date: Sat, 9 May 2026 08:09:09 +0000 Subject: [PATCH 4/8] fix: settings on 329.3 --- src/lib/ui/settings/patches/tabs.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/ui/settings/patches/tabs.tsx b/src/lib/ui/settings/patches/tabs.tsx index 9623034..3de056e 100644 --- a/src/lib/ui/settings/patches/tabs.tsx +++ b/src/lib/ui/settings/patches/tabs.tsx @@ -21,7 +21,9 @@ 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, @@ -44,6 +46,7 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { VendettaCustomPage: { type: "route", title: () => "Kettu", + useTitle: () => "Kettu", screen: { route: "VendettaCustomPage", getComponent: () => CustomPageRenderer @@ -52,6 +55,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 +64,7 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { BUNNY_CUSTOM_PAGE: { type: "route", title: () => "Kettu", + useTitle: () => "Kettu", screen: { route: "BUNNY_CUSTOM_PAGE", getComponent: () => CustomPageRenderer From 06c885339971064c9789b5c84100b4da468dfa65 Mon Sep 17 00:00:00 2001 From: kmmiio99o Date: Sat, 9 May 2026 15:24:22 +0200 Subject: [PATCH 5/8] fix crashing in Themes tab don't ask me how it did it --- src/lib/ui/settings/patches/tabs.tsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/lib/ui/settings/patches/tabs.tsx b/src/lib/ui/settings/patches/tabs.tsx index 0e411e1..5e0d337 100644 --- a/src/lib/ui/settings/patches/tabs.tsx +++ b/src/lib/ui/settings/patches/tabs.tsx @@ -30,8 +30,6 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { usePredicate: row.usePredicate, useTrailing: row.useTrailing, useTitle: row.title, - useBadge: () => undefined, - useIcon: () => row.icon, onPress: wrapOnPress(row.onPress, null, row.render, row.title()), withArrow: true, ...row.rawTabsConfig, @@ -52,9 +50,6 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { type: "route", title: () => "ShiggyCord", useTitle: () => "ShiggyCord", - useIcon: () => undefined, - useBadge: () => undefined, - IconComponent: () => undefined, screen: { route: "VendettaCustomPage", getComponent: () => CustomPageRenderer, @@ -64,9 +59,6 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { type: "route", title: () => "ShiggyCord", useTitle: () => "ShiggyCord", - useIcon: () => undefined, - useBadge: () => undefined, - IconComponent: () => undefined, screen: { route: "SHIGGYCORD_CUSTOM_PAGE", getComponent: () => CustomPageRenderer, @@ -76,9 +68,6 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { type: "route", title: () => "ShiggyCord", useTitle: () => "ShiggyCord", - useIcon: () => undefined, - useBadge: () => undefined, - IconComponent: () => undefined, screen: { route: "BUNNY_CUSTOM_PAGE", getComponent: () => CustomPageRenderer, From 61751664c53a23b355a2d36706f92393926a66ac Mon Sep 17 00:00:00 2001 From: cocobo1 Date: Thu, 14 May 2026 20:06:34 +0000 Subject: [PATCH 6/8] fix: settings on alpha 330.1+ --- src/lib/ui/settings/index.tsx | 3 +-- src/lib/ui/settings/patches/tabs.tsx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) 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 3de056e..027f5b0 100644 --- a/src/lib/ui/settings/patches/tabs.tsx +++ b/src/lib/ui/settings/patches/tabs.tsx @@ -29,8 +29,7 @@ export function patchTabsUI(unpatches: (() => void | boolean)[]) { 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)); From 2155a2a0554f09594899373cfd74b4b77581e80c Mon Sep 17 00:00:00 2001 From: kmmiio99o Date: Fri, 15 May 2026 21:41:32 +0200 Subject: [PATCH 7/8] feat: fix crash in Themes page --- src/core/i18n/index.ts | 13 +++++++++++-- src/core/ui/components/AddonCard.tsx | 5 +++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/core/i18n/index.ts b/src/core/i18n/index.ts index c3ec1ef..f745e98 100644 --- a/src/core/i18n/index.ts +++ b/src/core/i18n/index.ts @@ -156,6 +156,15 @@ export function formatString( val: Record, ): FormatStringRet { const str = Strings[key]; - // @ts-ignore - return new IntlMessageFormat(str).format(val); + if (!str) return str as FormatStringRet; + try { + // @ts-ignore + return new IntlMessageFormat(str).format(val); + } catch (e) { + if (e instanceof SyntaxError) { + logger.warn(`[i18n] Failed to parse message for key "${String(key)}":`, e.message); + return str as FormatStringRet; + } + throw e; + } } diff --git a/src/core/ui/components/AddonCard.tsx b/src/core/ui/components/AddonCard.tsx index e369090..fcce763 100644 --- a/src/core/ui/components/AddonCard.tsx +++ b/src/core/ui/components/AddonCard.tsx @@ -34,6 +34,7 @@ const useStyles = createStyles({ headerLeading: { flexDirection: "column", justifyContent: "center", + flexShrink: 1, scale: 1.2, }, headerTrailing: { @@ -108,9 +109,9 @@ export default function AddonCard(props: CardProps) { - {props.headerLabel} + {props.headerLabel} {props.headerSublabel && ( - {props.headerSublabel} + {props.headerSublabel} )} From 3637ba9963870f8574d7bc22df0c52cca2d59970 Mon Sep 17 00:00:00 2001 From: kmmiio99o Date: Fri, 29 May 2026 18:44:58 +0200 Subject: [PATCH 8/8] fix: crash in Themes page when using other languages than english, it was just crashing --- src/core/i18n/index.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/i18n/index.ts b/src/core/i18n/index.ts index f745e98..500f1b0 100644 --- a/src/core/i18n/index.ts +++ b/src/core/i18n/index.ts @@ -160,11 +160,12 @@ export function formatString( try { // @ts-ignore return new IntlMessageFormat(str).format(val); - } catch (e) { - if (e instanceof SyntaxError) { + } catch (e: any) { + if (e?.name === "SyntaxError") { logger.warn(`[i18n] Failed to parse message for key "${String(key)}":`, e.message); return str as FormatStringRet; } - throw e; + logger.warn(`[i18n] Failed to format message for key "${String(key)}":`, e?.message ?? e); + return str as FormatStringRet; } }