This commit is contained in:
Nuckyz 2024-07-02 20:21:26 -03:00
parent c7e49672f5
commit a95037d80a
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9

View file

@ -16,7 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
import { canonicalizeMatch } from "@utils/patches";
import { Channel } from "discord-types/general"; import { Channel } from "discord-types/general";
// eslint-disable-next-line path-alias/no-relative // eslint-disable-next-line path-alias/no-relative
@ -152,11 +151,10 @@ export const InviteActions = findByProps("resolveInvite");
export const IconUtils = findByProps<t.IconUtils>("getGuildBannerURL", "getUserAvatarURL"); export const IconUtils = findByProps<t.IconUtils>("getGuildBannerURL", "getUserAvatarURL");
const openExpressionPickerMatcher = canonicalizeMatch(/setState\({activeView:\i,activeViewType:/);
// TODO: type // TODO: type
export const ExpressionPickerStore: t.ExpressionPickerStore = mapMangledModule("expression-picker-last-active-view", { export const ExpressionPickerStore: t.ExpressionPickerStore = mapMangledModule("expression-picker-last-active-view", {
closeExpressionPicker: filters.byCode("setState({activeView:null"), 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"', { 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"'), setAlwaysOnTop: filters.byCode('type:"POPOUT_WINDOW_SET_ALWAYS_ON_TOP"'),
}); });
export const UsernameUtils: t.UsernameUtils = findByProps("useName", "getGlobalName"); export const UsernameUtils = findByProps<t.UsernameUtils>("useName", "getGlobalName");
export const DisplayProfileUtils: t.DisplayProfileUtils = mapMangledModule(/=\i\.getUserProfile\(\i\),\i=\i\.getGuildMemberProfile\(/, { export const DisplayProfileUtils: t.DisplayProfileUtils = mapMangledModule(/=\i\.getUserProfile\(\i\),\i=\i\.getGuildMemberProfile\(/, {
getDisplayProfile: filters.byCode(".getGuildMemberProfile("), getDisplayProfile: filters.byCode(".getGuildMemberProfile("),
useDisplayProfile: filters.byCode(/\[\i\.\i,\i\.\i],\(\)=>/) useDisplayProfile: filters.byCode(/\[\i\.\i,\i\.\i],\(\)=>/)