Decor: Fix crashing

This commit is contained in:
Nuckyz 2024-11-07 15:07:00 -03:00
parent 2270b88a98
commit cd3a998c4b
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
5 changed files with 85 additions and 38 deletions

View file

@ -163,9 +163,13 @@ waitFor(["open", "saveAccountChanges"], m => SettingsRouter = m);
export const PermissionsBits: t.PermissionsBits = findLazy(m => typeof m.ADMINISTRATOR === "bigint");
export const zustandCreate = findByCodeLazy("will be removed in v4");
export const { zustandCreate } = mapMangledModuleLazy(["useSyncExternalStoreWithSelector:", "Object.assign"], {
zustandCreate: m => typeof m === "function"
});
export const zustandPersist = findByCodeLazy("[zustand persist middleware]");
export const { zustandPersist } = mapMangledModuleLazy(".onRehydrateStorage)?", {
zustandPersist: m => typeof m === "function"
});
export const MessageActions = findByPropsLazy("editMessage", "sendMessage");
export const MessageCache = findByPropsLazy("clearCache", "_channelMessages");
@ -181,7 +185,7 @@ export const ExpressionPickerStore: t.ExpressionPickerStore = mapMangledModuleLa
toggleExpressionPicker: filters.byCode(/getState\(\)\.activeView===\i\?\i\(\):\i\(/),
setExpressionPickerView: filters.byCode(/setState\({activeView:\i,lastActiveView:/),
setSearchQuery: filters.byCode("searchQuery:"),
useExpressionPickerStore: filters.byCode("Object.is")
useExpressionPickerStore: filters.byCode(".getInitialState")
});
export const PopoutActions: t.PopoutActions = mapMangledModuleLazy('type:"POPOUT_WINDOW_OPEN"', {