diff --git a/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx b/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx index ecc1f538..ac734e1c 100644 --- a/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx +++ b/src/equicordplugins/channelTabs/components/BookmarkContainer.tsx @@ -8,8 +8,7 @@ import { classNameFactory } from "@api/Styles"; import { getIntlMessage } from "@utils/discord"; import { classes } from "@utils/misc"; import { closeModal, openModal } from "@utils/modal"; -import { findByPropsLazy } from "@webpack"; -import { Avatar, ChannelStore, ContextMenuApi, FluxDispatcher, GuildStore, Menu, ReadStateStore, ReadStateUtils, Text, Tooltip, useDrag, useDrop, useEffect, useRef, UserStore } from "@webpack/common"; +import { Avatar, ChannelStore, ContextMenuApi, FluxDispatcher, GuildStore, Icons, Menu, ReadStateStore, ReadStateUtils, Text, Tooltip, useDrag, useDrop, useEffect, useRef, UserStore } from "@webpack/common"; import { BasicChannelTabsProps, Bookmark, BookmarkFolder, BookmarkProps, CircleQuestionIcon, isBookmarkFolder, settings, switchChannel, useBookmarks } from "../util"; import { NotificationDot } from "./ChannelTab"; @@ -17,7 +16,7 @@ import { BookmarkContextMenu, EditModal } from "./ContextMenus"; const cl = classNameFactory("vc-channeltabs-"); -const { StarIcon } = findByPropsLazy("StarIcon"); +const { StarIcon } = Icons; function FolderIcon({ fill }: { fill: string; }) { return ( diff --git a/src/equicordplugins/channelTabs/components/ChannelTab.tsx b/src/equicordplugins/channelTabs/components/ChannelTab.tsx index 3bdd20ce..4d189e7e 100644 --- a/src/equicordplugins/channelTabs/components/ChannelTab.tsx +++ b/src/equicordplugins/channelTabs/components/ChannelTab.tsx @@ -8,7 +8,7 @@ import { classNameFactory } from "@api/Styles"; import { getIntlMessage, getUniqueUsername } from "@utils/discord"; import { classes } from "@utils/misc"; import { findByPropsLazy, findComponentByCodeLazy } from "@webpack"; -import { Avatar, ChannelStore, ContextMenuApi, Dots, GuildStore, PresenceStore, ReadStateStore, Text, TypingStore, useDrag, useDrop, useRef, UserStore, useStateFromStores } from "@webpack/common"; +import { Avatar, ChannelStore, ContextMenuApi, Dots, GuildStore, Icons, PresenceStore, ReadStateStore, Text, TypingStore, useDrag, useDrop, useRef, UserStore, useStateFromStores } from "@webpack/common"; import { Channel, Guild, User } from "discord-types/general"; import { ChannelTabsProps, CircleQuestionIcon, closeTab, isTabSelected, moveDraggedTabs, moveToTab, openedTabs, settings } from "../util"; @@ -17,7 +17,7 @@ import { TabContextMenu } from "./ContextMenus"; const { getBadgeWidthForValue } = findByPropsLazy("getBadgeWidthForValue"); const dotStyles = findByPropsLazy("numberBadge", "textBadge"); -const { FriendsIcon } = findByPropsLazy("FriendsIcon"); +const { FriendsIcon } = Icons; const ChannelTypeIcon = findComponentByCodeLazy(".iconContainerWithGuildIcon,"); const cl = classNameFactory("vc-channeltabs-"); diff --git a/src/equicordplugins/channelTabs/components/ChannelTabsContainer.tsx b/src/equicordplugins/channelTabs/components/ChannelTabsContainer.tsx index b1181b53..7b30a42a 100644 --- a/src/equicordplugins/channelTabs/components/ChannelTabsContainer.tsx +++ b/src/equicordplugins/channelTabs/components/ChannelTabsContainer.tsx @@ -6,8 +6,7 @@ import { classNameFactory } from "@api/Styles"; import { useForceUpdater } from "@utils/react"; -import { findByPropsLazy } from "@webpack"; -import { Button, ContextMenuApi, Flex, FluxDispatcher, Forms, useCallback, useEffect, useRef, UserStore, useState } from "@webpack/common"; +import { Button, ContextMenuApi, Flex, FluxDispatcher, Forms, Icons, useCallback, useEffect, useRef, UserStore, useState } from "@webpack/common"; import { BasicChannelTabsProps, ChannelTabsProps, createTab, handleChannelSwitch, openedTabs, openStartupTabs, saveTabs, settings, setUpdaterFunction, useGhostTabs } from "../util"; import BookmarkContainer from "./BookmarkContainer"; @@ -16,7 +15,7 @@ import { BasicContextMenu } from "./ContextMenus"; type TabSet = Record; -const { PlusSmallIcon } = findByPropsLazy("PlusSmallIcon"); +const { PlusSmallIcon } = Icons; const cl = classNameFactory("vc-channeltabs-"); export default function ChannelsTabsContainer(props: BasicChannelTabsProps) { diff --git a/src/equicordplugins/channelTabs/util/constants.ts b/src/equicordplugins/channelTabs/util/constants.ts index 45491dc8..18f2c9b2 100644 --- a/src/equicordplugins/channelTabs/util/constants.ts +++ b/src/equicordplugins/channelTabs/util/constants.ts @@ -7,7 +7,7 @@ import { definePluginSettings } from "@api/Settings"; import { Logger } from "@utils/Logger"; import { OptionType } from "@utils/types"; -import { findByPropsLazy } from "@webpack"; +import { Icons } from "@webpack/common"; import { ChannelTabsPreview } from "../components/ChannelTabsContainer"; @@ -74,4 +74,4 @@ export const settings = definePluginSettings({ } }); -export const { CircleQuestionIcon } = findByPropsLazy("CircleQuestionIcon"); +export const { CircleQuestionIcon } = Icons; diff --git a/src/equicordplugins/keywordNotify/index.tsx b/src/equicordplugins/keywordNotify/index.tsx index 621755b0..586e2215 100644 --- a/src/equicordplugins/keywordNotify/index.tsx +++ b/src/equicordplugins/keywordNotify/index.tsx @@ -328,17 +328,16 @@ export default definePlugin({ }, { find: ".guildFilter:null", - replacement: { - match: /function (\i)\(\i\){let{message:\i,gotoMessage/, - replace: "$self.renderMsg = $1; $&" - } - }, - { - find: ".guildFilter:null", - replacement: { - match: /onClick:\(\)=>(\i\.\i\.deleteRecentMention\((\i)\.id\))/, - replace: "onClick: () => $2._keyword ? $self.deleteKeyword($2.id) : $1" - } + replacement: [ + { + match: /function (\i)\(\i\){let{message:\i,gotoMessage/, + replace: "$self.renderMsg = $1; $&" + }, + { + match: /onClick:\(\)=>(\i\.\i\.deleteRecentMention\((\i)\.id\))/, + replace: "onClick: () => $2._keyword ? $self.deleteKeyword($2.id) : $1" + } + ] } ],