From a95037d80a0acfa8fc9d7d7c58e78b53da228cd4 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 2 Jul 2024 20:21:26 -0300 Subject: [PATCH] cleanup --- src/webpack/common/utils.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/webpack/common/utils.ts b/src/webpack/common/utils.ts index 9822741ee..bd2fc4640 100644 --- a/src/webpack/common/utils.ts +++ b/src/webpack/common/utils.ts @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import { canonicalizeMatch } from "@utils/patches"; import { Channel } from "discord-types/general"; // eslint-disable-next-line path-alias/no-relative @@ -152,11 +151,10 @@ export const InviteActions = findByProps("resolveInvite"); export const IconUtils = findByProps("getGuildBannerURL", "getUserAvatarURL"); -const openExpressionPickerMatcher = canonicalizeMatch(/setState\({activeView:\i,activeViewType:/); // TODO: type export const ExpressionPickerStore: t.ExpressionPickerStore = mapMangledModule("expression-picker-last-active-view", { closeExpressionPicker: filters.byCode("setState({activeView:null"), - openExpressionPicker: m => typeof m === "function" && openExpressionPickerMatcher.test(String(m)), + openExpressionPicker: filters.byCode(/setState\({activeView:\i,activeViewType:/), }); export const PopoutActions: t.PopoutActions = mapMangledModule('type:"POPOUT_WINDOW_OPEN"', { @@ -165,7 +163,7 @@ export const PopoutActions: t.PopoutActions = mapMangledModule('type:"POPOUT_WIN setAlwaysOnTop: filters.byCode('type:"POPOUT_WINDOW_SET_ALWAYS_ON_TOP"'), }); -export const UsernameUtils: t.UsernameUtils = findByProps("useName", "getGlobalName"); +export const UsernameUtils = findByProps("useName", "getGlobalName"); export const DisplayProfileUtils: t.DisplayProfileUtils = mapMangledModule(/=\i\.getUserProfile\(\i\),\i=\i\.getGuildMemberProfile\(/, { getDisplayProfile: filters.byCode(".getGuildMemberProfile("), useDisplayProfile: filters.byCode(/\[\i\.\i,\i\.\i],\(\)=>/)