Skip to content

Commit

Permalink
Revert some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinRMC committed Jan 29, 2025
1 parent caed34e commit 98d3945
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 21 deletions.
23 changes: 12 additions & 11 deletions src/plusplugins/KeywordNotify/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated, camila314, and contributors
* Copyright (c) 2025 Vendicated, camila314, and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/

Expand Down Expand Up @@ -328,16 +328,17 @@ export default definePlugin({
},
{
find: ".guildFilter:null",
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"
}
]
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"
}
}
],

Expand Down
5 changes: 3 additions & 2 deletions src/plusplugins/channelTabs/components/BookmarkContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ import { classNameFactory } from "@api/Styles";
import { getIntlMessage } from "@utils/discord";
import { classes } from "@utils/misc";
import { closeModal, openModal } from "@utils/modal";
import { Avatar, ChannelStore, ContextMenuApi, FluxDispatcher, GuildStore, Icons, Menu, ReadStateStore, ReadStateUtils, Text, Tooltip, useDrag, useDrop, useEffect, useRef, UserStore } from "@webpack/common";
import { findByPropsLazy } from "@webpack";
import { Avatar, ChannelStore, ContextMenuApi, FluxDispatcher, GuildStore, 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";
import { BookmarkContextMenu, EditModal } from "./ContextMenus";

const cl = classNameFactory("vc-channeltabs-");

const { StarIcon } = Icons;
const { StarIcon } = findByPropsLazy("StarIcon");

function FolderIcon({ fill }: { fill: string; }) {
return (
Expand Down
6 changes: 3 additions & 3 deletions src/plusplugins/channelTabs/components/ChannelTab.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/*
* Vencord, a Discord client mod
* Copyright (c) 2025 Vendicated and contributors
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/

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, Icons, PresenceStore, ReadStateStore, Text, TypingStore, useDrag, useDrop, useRef, UserStore, useStateFromStores } from "@webpack/common";
import { Avatar, ChannelStore, ContextMenuApi, Dots, GuildStore, 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";
Expand All @@ -17,7 +17,7 @@ import { TabContextMenu } from "./ContextMenus";
const { getBadgeWidthForValue } = findByPropsLazy("getBadgeWidthForValue");
const dotStyles = findByPropsLazy("numberBadge", "textBadge");

const { FriendsIcon } = Icons;
const { FriendsIcon } = findByPropsLazy("FriendsIcon");
const ChannelTypeIcon = findComponentByCodeLazy(".iconContainerWithGuildIcon,");

const cl = classNameFactory("vc-channeltabs-");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

import { classNameFactory } from "@api/Styles";
import { useForceUpdater } from "@utils/react";
import { Button, ContextMenuApi, Flex, FluxDispatcher, Forms, Icons, useCallback, useEffect, useRef, UserStore, useState } from "@webpack/common";
import { findByPropsLazy } from "@webpack";
import { Button, ContextMenuApi, Flex, FluxDispatcher, Forms, 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";
Expand All @@ -15,7 +16,7 @@ import { BasicContextMenu } from "./ContextMenus";

type TabSet = Record<string, ChannelTabsProps[]>;

const { PlusSmallIcon } = Icons;
const { PlusSmallIcon } = findByPropsLazy("PlusSmallIcon");
const cl = classNameFactory("vc-channeltabs-");

export default function ChannelsTabsContainer(props: BasicChannelTabsProps) {
Expand Down
6 changes: 3 additions & 3 deletions src/plusplugins/channelTabs/util/constants.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
* Vencord, a Discord client mod
* Copyright (c) 2025 Vendicated and contributors
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/

import { definePluginSettings } from "@api/Settings";
import { Logger } from "@utils/Logger";
import { OptionType } from "@utils/types";
import { Icons } from "@webpack/common";
import { findByPropsLazy } from "@webpack";

import { ChannelTabsPreview } from "../components/ChannelTabsContainer";

Expand Down Expand Up @@ -74,4 +74,4 @@ export const settings = definePluginSettings({
}
});

export const { CircleQuestionIcon } = Icons;
export const { CircleQuestionIcon } = findByPropsLazy("CircleQuestionIcon");

0 comments on commit 98d3945

Please sign in to comment.