diff --git a/scripts/build.mjs b/scripts/build.mjs index 5f02974..dddd321 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"`, }, }, }, diff --git a/src/core/plugins/index.ts b/src/core/plugins/index.ts index 4b70528..90e2c7f 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")), "bunny.favouriteanything": makeLazyPlugin(() => require("./favouriteanything")), "bunny.nodelete": makeLazyPlugin(() => require("./nodelete")), 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"); - }, -}); 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,