bring back destructuring

This commit is contained in:
camila314 2023-11-25 17:18:42 -06:00
parent 2870bd7003
commit 42b09a3d0b

View file

@ -19,9 +19,8 @@ let regexes = [];
const MenuHeader = findByCodeLazy("useInDesktopNotificationCenterExperiment)("); const MenuHeader = findByCodeLazy("useInDesktopNotificationCenterExperiment)(");
const Popout = findByPropsLazy("ItemsPopout"); const Popout = findByPropsLazy("ItemsPopout");
const popoutClasses = findByPropsLazy("recentMentionsPopout"); const { recentMentionsPopout } = findByPropsLazy("recentMentionsPopout");
const MessageObject = findByCodeLazy("}isFirstMessageInForumPost"); const { createMessageRecord } = findByPropsLazy("createMessageRecord", "updateMessageRecord");
const createMessageRecord = findByPropsLazy("createMessageRecord", "updateMessageRecord");
async function setRegexes(idx: number, reg: string) { async function setRegexes(idx: number, reg: string) {
@ -185,7 +184,7 @@ export default definePlugin({
if (m == null || this.keywordLog.some((e) => e.id == m.id)) if (m == null || this.keywordLog.some((e) => e.id == m.id))
return; return;
let thing = createMessageRecord.createMessageRecord(m); let thing = createMessageRecord(m);
this.keywordLog.push(thing); this.keywordLog.push(thing);
this.keywordLog.sort((a, b) => b.timestamp - a.timestamp); this.keywordLog.sort((a, b) => b.timestamp - a.timestamp);
@ -245,7 +244,7 @@ export default definePlugin({
return ( return (
<> <>
<Popout.default <Popout.default
className={popoutClasses.recentMentionsPopout} className={recentMentionsPopout}
renderHeader={() => header} renderHeader={() => header}
renderMessage={messageRender} renderMessage={messageRender}
channel={channel} channel={channel}