Remove obsolete mapMangledModule ~ modules are no longer mangled

This commit is contained in:
V 2023-11-23 03:11:17 +01:00
parent 6869705673
commit 63451bad25
No known key found for this signature in database
GPG key ID: A1DC0CFB5615D905
12 changed files with 46 additions and 90 deletions

View file

@ -19,11 +19,9 @@
import { Devs } from "@utils/constants";
import { insertTextIntoChatInputBox } from "@utils/discord";
import definePlugin from "@utils/types";
import { filters, mapMangledModuleLazy } from "@webpack";
import { findByPropsLazy } from "@webpack";
const ExpressionPickerState = mapMangledModuleLazy('name:"expression-picker-last-active-view"', {
close: filters.byCode("activeView:null", "setState")
});
const { closeExpressionPicker } = findByPropsLazy("closeExpressionPicker");
export default definePlugin({
name: "GifPaste",
@ -41,7 +39,7 @@ export default definePlugin({
handleSelect(gif?: { url: string; }) {
if (gif) {
insertTextIntoChatInputBox(gif.url + " ");
ExpressionPickerState.close();
closeExpressionPicker();
}
}
});