From 45f9b55c4200e416e9063c72653cb6d183ae4378 Mon Sep 17 00:00:00 2001 From: MaxxusX <66540504+MaxxusX@users.noreply.github.com> Date: Wed, 6 Nov 2024 01:30:26 -0600 Subject: [PATCH 1/5] [skip ci] fix minor misspelling on ErrorBoundaryScreen (#100) --- src/core/ui/reporter/components/ErrorBoundaryScreen.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx b/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx index 9c6174b..124d665 100644 --- a/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx +++ b/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx @@ -34,7 +34,7 @@ export default function ErrorBoundaryScreen(props: { Uh oh. - A crash occured while rendering a component. This could be caused by a plugin, Bunny or Discord itself. + A crash occurred while rendering a component. This could be caused by a plugin, Bunny or Discord itself. {debugInfo.os.name}; {debugInfo.discord.build} ({debugInfo.discord.version}); {debugInfo.bunny.version} From 6f95203dfa5beb3b48a9cc6061e712acd0ca8fb3 Mon Sep 17 00:00:00 2001 From: Palm Date: Wed, 6 Nov 2024 14:32:36 +0700 Subject: [PATCH 2/5] fix(lib/api/native/modules): add more native module fallbacks (#102) closes #99 --- src/lib/api/native/modules/index.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/api/native/modules/index.ts b/src/lib/api/native/modules/index.ts index 615bed6..c0736ed 100644 --- a/src/lib/api/native/modules/index.ts +++ b/src/lib/api/native/modules/index.ts @@ -3,9 +3,8 @@ import { RNModules } from "./types"; const nmp = window.nativeModuleProxy; export const MMKVManager = nmp.MMKVManager as RNModules.MMKVManager; -export const FileManager = (nmp.DCDFileManager ?? nmp.RTNFileManager) as RNModules.FileManager; -export const ClientInfoManager = nmp.InfoDictionaryManager ?? nmp.RTNClientInfoManager; -export const DeviceManager = nmp.DCDDeviceManager ?? nmp.RTNDeviceManager; +export const FileManager = (nmp.NativeFileModule ?? nmp.RTNFileManager ?? nmp.DCDFileManager) as RNModules.FileManager; +export const ClientInfoManager = nmp.NativeClientInfoModule ?? nmp.RTNClientInfoManager ?? nmp.InfoDictionaryManager; +export const DeviceManager = nmp.NativeDeviceModule ?? nmp.RTNDeviceManager ?? nmp.DCDDeviceManager; export const { BundleUpdaterManager } = nmp; -export const ThemeManager = nmp.RTNThemeManager ?? nmp.DCDTheme; - +export const ThemeManager = nmp.NativeThemeModule ?? nmp.RTNThemeManager ?? nmp.DCDTheme; From beaf689f8582a8a3348223650711784f1a46bcfd Mon Sep 17 00:00:00 2001 From: pylix <82711525+pylixonly@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:36:20 +0800 Subject: [PATCH 3/5] chore: update token in build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0286a9c..0e66bfc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,7 +17,7 @@ jobs: - name: Checkout builds uses: actions/checkout@v4 with: - repository: "pyoncord/bunny-builds" + repository: "bunny-mod/builds" path: "builds" token: ${{ secrets.BUILDS_TOKEN }} ref: ${{ github.ref_name }} From 99d3e45d8f17376c420a85e617332bd259738909 Mon Sep 17 00:00:00 2001 From: A1Asriel <27139654+A1Asriel@users.noreply.github.com> Date: Sat, 9 Nov 2024 12:02:46 +0300 Subject: [PATCH 4/5] chore: update GitHub link constant [skip ci] (#105) --- src/lib/utils/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/utils/constants.ts b/src/lib/utils/constants.ts index 45632b6..910cc47 100644 --- a/src/lib/utils/constants.ts +++ b/src/lib/utils/constants.ts @@ -1,5 +1,5 @@ export const DISCORD_SERVER = "https://discord.gg/XjYgWXHb9Q"; -export const GITHUB = "https://github.com/pyoncord"; +export const GITHUB = "https://github.com/bunny-mod"; export const HTTP_REGEX = /^https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/; export const HTTP_REGEX_MULTI = /https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&//=]*)/g; From 5e3f9b72361159da57c072cafed44424184d57f5 Mon Sep 17 00:00:00 2001 From: pylixonly <82711525+pylixonly@users.noreply.github.com> Date: Sat, 9 Nov 2024 17:03:06 +0800 Subject: [PATCH 5/5] fix: wrap ErrorBoundaryScreen with SafeAreaProvider --- .../components/ErrorBoundaryScreen.tsx | 38 ++++++++++--------- src/metro/common/components.ts | 2 +- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx b/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx index 124d665..7ff7c18 100644 --- a/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx +++ b/src/core/ui/reporter/components/ErrorBoundaryScreen.tsx @@ -5,7 +5,7 @@ import { settings } from "@lib/api/settings"; import { Codeblock, ErrorBoundary } from "@lib/ui/components"; import { createStyles } from "@lib/ui/styles"; import { tokens } from "@metro/common"; -import { Button, Card, SafeAreaView, Text } from "@metro/common/components"; +import { Button, Card, SafeAreaProvider, SafeAreaView, Text } from "@metro/common/components"; import { ScrollView, View } from "react-native"; import ErrorComponentStackCard from "./ErrorComponentStackCard"; @@ -31,22 +31,24 @@ export default function ErrorBoundaryScreen(props: { const debugInfo = getDebugInfo(); return - - - Uh oh. - A crash occurred while rendering a component. This could be caused by a plugin, Bunny or Discord itself. - {debugInfo.os.name}; {debugInfo.discord.build} ({debugInfo.discord.version}); {debugInfo.bunny.version} - - - {props.error.message} - {hasStack(props.error) && } - {isComponentStack(props.error) ? : null} - - -