From ed99ae7f2383ffbecfff010ac1de9244038bbe8b Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 22 Jan 2025 22:22:43 -0300 Subject: [PATCH] ShowHiddenThings: Fix showing ModView --- src/plugins/customRPC/index.tsx | 15 +++++++++++++-- src/plugins/fakeNitro/index.tsx | 2 +- src/plugins/showHiddenThings/index.ts | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/plugins/customRPC/index.tsx b/src/plugins/customRPC/index.tsx index 64aea76aa..6f7719332 100644 --- a/src/plugins/customRPC/index.tsx +++ b/src/plugins/customRPC/index.tsx @@ -31,7 +31,7 @@ import { findByCodeLazy, findComponentByCodeLazy } from "@webpack"; import { ApplicationAssetUtils, Button, FluxDispatcher, Forms, React, UserStore } from "@webpack/common"; const useProfileThemeStyle = findByCodeLazy("profileThemeStyle:", "--profile-gradient-primary-color"); -const ActivityView = findComponentByCodeLazy('location:"UserProfileActivityCard",'); +const ActivityView = findComponentByCodeLazy(".party?(0", ".card"); const ShowCurrentGame = getUserSettingLazy("status", "showCurrentGame")!; @@ -399,6 +399,17 @@ export default definePlugin({ stop: () => setRpc(true), settings, + patches: [ + { + find: ".party?(0", + all: true, + replacement: { + match: /\i\.id===\i\.id\?null:/, + replace: "" + } + } + ], + settingsAboutComponent: () => { const activity = useAwaiter(createActivity); const gameActivityEnabled = ShowCurrentGame.useSetting(); @@ -449,7 +460,7 @@ export default definePlugin({ {activity[0] && } diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index 68e6cf990..df8b4cd87 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -391,7 +391,7 @@ export default definePlugin({ }, // Separate patch for allowing using custom app icons { - find: /\.getCurrentDesktopIcon.{0,25}\.isPremium/, + find: "?24:30,", replacement: { match: /\i\.\i\.isPremium\(\i\.\i\.getCurrentUser\(\)\)/, replace: "true" diff --git a/src/plugins/showHiddenThings/index.ts b/src/plugins/showHiddenThings/index.ts index 6ee131a8d..7fba0131e 100644 --- a/src/plugins/showHiddenThings/index.ts +++ b/src/plugins/showHiddenThings/index.ts @@ -58,7 +58,7 @@ export default definePlugin({ }, }, { - find: /context:\i,checkElevated:!1\}\),\i\.\i.{0,200}autoTrackExposure/, + find: /,checkElevated:!1}\),\i\.\i\)}(?<=getCurrentUser\(\);return.+?)/, predicate: () => settings.store.showModView, replacement: { match: /return \i\.\i\(\i\.\i\(\{user:\i,context:\i,checkElevated:!1\}\),\i\.\i\)/,