From 4e7e09f4ffeb6aa79fadc6f7f35806cd740b3550 Mon Sep 17 00:00:00 2001 From: camila314 <47485054+camila314@users.noreply.github.com> Date: Sun, 23 Jun 2024 14:33:11 -0500 Subject: [PATCH] review changes --- src/plugins/keywordNotify/index.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/plugins/keywordNotify/index.tsx b/src/plugins/keywordNotify/index.tsx index f9c556078..da7da2c7b 100644 --- a/src/plugins/keywordNotify/index.tsx +++ b/src/plugins/keywordNotify/index.tsx @@ -7,7 +7,7 @@ import "./style.css"; import definePlugin, { OptionType } from "@utils/types"; -import { Button, ChannelStore, Forms, SearchableSelect,SelectedChannelStore, TabBar, TextInput, UserStore, UserUtils, useState } from "@webpack/common"; +import { Button, ChannelStore, Forms, Select,SelectedChannelStore, TabBar, TextInput, UserStore, UserUtils, useState } from "@webpack/common"; import { classNameFactory } from "@api/Styles"; import { DataStore } from "@api/index"; import { definePluginSettings } from "@api/Settings"; @@ -147,16 +147,17 @@ function ListedIds({ listIds, setListIds }) { function ListTypeSelector({ listType, setListType }) { return ( - v === listType} closeOnSelect={true} value={listType} - onChange={setListType} + select={setListType} + serialize={v => v} /> ); } @@ -303,7 +304,7 @@ export default definePlugin({ applyKeywordEntries(m: Message) { let matches = false; - keywordEntries.forEach(entry => { + for (let entry of keywordEntries) { if (entry.regex === "") { return; } @@ -345,7 +346,7 @@ export default definePlugin({ } } } - }); + } if (matches) { m.mentions.push(currentUser);