mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-10 09:56:24 +00:00
review changes
This commit is contained in:
parent
5c843bdbb7
commit
4e7e09f4ff
1 changed files with 7 additions and 6 deletions
|
@ -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 (
|
||||
<SearchableSelect
|
||||
<Select
|
||||
options={[
|
||||
{ label: "Whitelist", value: ListType.Whitelist },
|
||||
{ label: "Blacklist", value: ListType.BlackList }
|
||||
]}
|
||||
placeholder={"Select a list type"}
|
||||
maxVisibleItems={2}
|
||||
isSelected={v => 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);
|
||||
|
|
Loading…
Reference in a new issue