Fix weird spacing for keywordnotify

This commit is contained in:
thororen1234 2024-09-12 16:42:14 -04:00
parent 3d5d1825f0
commit 569e1734d7

View file

@ -21,7 +21,6 @@ import { Button, ChannelStore, FluxDispatcher, Forms, Select, SelectedChannelSto
import { Message, User } from "discord-types/general/index.js"; import { Message, User } from "discord-types/general/index.js";
import type { PropsWithChildren } from "react"; import type { PropsWithChildren } from "react";
type IconProps = JSX.IntrinsicElements["svg"]; type IconProps = JSX.IntrinsicElements["svg"];
type KeywordEntry = { regex: string, listIds: Array<string>, listType: ListType, ignoreCase: boolean; }; type KeywordEntry = { regex: string, listIds: Array<string>, listType: ListType, ignoreCase: boolean; };
@ -30,7 +29,6 @@ let currentUser: User;
let keywordLog: Array<any> = []; let keywordLog: Array<any> = [];
let interceptor: (e: any) => void; let interceptor: (e: any) => void;
const recentMentionsPopoutClass = findByPropsLazy("recentMentionsPopout"); const recentMentionsPopoutClass = findByPropsLazy("recentMentionsPopout");
const tabClass = findByPropsLazy("inboxTitle", "tab"); const tabClass = findByPropsLazy("inboxTitle", "tab");
const buttonClass = findByPropsLazy("size36"); const buttonClass = findByPropsLazy("size36");
@ -172,7 +170,6 @@ function ListTypeSelector({ listType, setListType }: { listType: ListType, setLi
); );
} }
function KeywordEntries() { function KeywordEntries() {
const update = useForceUpdater(); const update = useForceUpdater();
const [values] = useState(keywordEntries); const [values] = useState(keywordEntries);
@ -359,6 +356,7 @@ export default definePlugin({
}; };
FluxDispatcher.addInterceptor(interceptor); FluxDispatcher.addInterceptor(interceptor);
}, },
stop() { stop() {
const index = FluxDispatcher._interceptors.indexOf(interceptor); const index = FluxDispatcher._interceptors.indexOf(interceptor);
if (index > -1) { if (index > -1) {