From 698975da16766f2a9c52815e2e3ee0ca3f02b234 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Tue, 25 Mar 2025 11:33:48 -0400 Subject: [PATCH] Move QuestCompleter Icon To A Find --- src/equicordplugins/holyNotes/index.tsx | 4 ++-- src/equicordplugins/questCompleter/index.tsx | 24 ++++---------------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/src/equicordplugins/holyNotes/index.tsx b/src/equicordplugins/holyNotes/index.tsx index c94df68c..0810d954 100644 --- a/src/equicordplugins/holyNotes/index.tsx +++ b/src/equicordplugins/holyNotes/index.tsx @@ -26,7 +26,7 @@ import { EquicordDevs } from "@utils/constants"; import { classes } from "@utils/misc"; import { openModal } from "@utils/modal"; import definePlugin from "@utils/types"; -import { findByProps, findExportedComponentLazy } from "@webpack"; +import { findByProps, findComponentByCodeLazy } from "@webpack"; import { ChannelStore, Menu } from "@webpack/common"; import { Message } from "discord-types/general"; @@ -35,7 +35,7 @@ import { NoteModal } from "./components/modals/Notebook"; import noteHandler, { noteHandlerCache } from "./NoteHandler"; import { DataStoreToCache, HolyNoteStore } from "./utils"; -const HeaderBarIcon = findExportedComponentLazy("Icon", "Divider"); +const HeaderBarIcon = findComponentByCodeLazy(".HEADER_BAR_BADGE_TOP:", '.iconBadge,"top"'); const messageContextMenuPatch: NavContextMenuPatchCallback = async (children, { message }: { message: Message; }) => { children.push( diff --git a/src/equicordplugins/questCompleter/index.tsx b/src/equicordplugins/questCompleter/index.tsx index 2da786fe..76f63d06 100644 --- a/src/equicordplugins/questCompleter/index.tsx +++ b/src/equicordplugins/questCompleter/index.tsx @@ -22,34 +22,18 @@ import { showNotification } from "@api/Notifications"; import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; import { getTheme, Theme } from "@utils/discord"; -import { classes } from "@utils/misc"; import definePlugin, { OptionType } from "@utils/types"; -import { findByProps, findExportedComponentLazy } from "@webpack"; +import { findByProps, findComponentByCodeLazy } from "@webpack"; import { Button, FluxDispatcher, Forms, NavigationRouter, RestAPI, Tooltip, UserStore } from "@webpack/common"; -const HeaderBarIcon = findExportedComponentLazy("Icon", "Divider"); + +const HeaderBarIcon = findComponentByCodeLazy(".HEADER_BAR_BADGE_TOP:", '.iconBadge,"top"'); const isApp = navigator.userAgent.includes("Electron/"); import "./style.css"; import { definePluginSettings } from "@api/Settings"; -function ToolBarQuestsIcon() { - return ( - - - - ); -} +const ToolBarQuestsIcon = findComponentByCodeLazy("1 0 1 1.73Z"); function ToolBarHeader() { return (