From 50eb62045a329a8e1208ebbe26bb4ff232538f4d Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Mon, 8 Sep 2025 22:18:39 -0300 Subject: [PATCH] Fix FavoriteGifSearch & broken Menu component find --- src/plugins/favGifSearch/index.tsx | 8 +------- src/webpack/common/menu.ts | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/plugins/favGifSearch/index.tsx b/src/plugins/favGifSearch/index.tsx index d88ced34..7ab0145e 100644 --- a/src/plugins/favGifSearch/index.tsx +++ b/src/plugins/favGifSearch/index.tsx @@ -20,13 +20,11 @@ import { definePluginSettings } from "@api/Settings"; import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; -import { findByPropsLazy } from "@webpack"; import { useCallback, useEffect, useRef, useState } from "@webpack/common"; interface SearchBarComponentProps { - ref?: React.MutableRefObject; + ref?: React.RefObject; autoFocus: boolean; - className: string; size: string; onChange: (query: string) => void; onClear: () => void; @@ -59,9 +57,6 @@ interface Instance { forceUpdate: () => void; } - -const containerClasses: { searchBar: string; } = findByPropsLazy("searchBar", "searchBarFullRow"); - export const settings = definePluginSettings({ searchOption: { type: OptionType.SELECT, @@ -181,7 +176,6 @@ function SearchBar({ instance, SearchBarComponent }: { instance: Instance; Searc { diff --git a/src/webpack/common/menu.ts b/src/webpack/common/menu.ts index e4c5d0a3..7e5447ce 100644 --- a/src/webpack/common/menu.ts +++ b/src/webpack/common/menu.ts @@ -42,7 +42,7 @@ waitFor(m => m.name === "MenuCheckboxItem", (_, id) => { waitFor(filters.componentByCode('path:["empty"]'), m => Menu.Menu = m); waitFor(filters.componentByCode("sliderContainer", "slider", "handleSize:16", "=100"), m => Menu.MenuSliderControl = m); -waitFor(filters.componentByCode('role:"searchbox', "top:2", "query:"), m => Menu.MenuSearchControl = m); +waitFor(filters.componentByCode(".SEARCH)", ".focus()", "query:"), m => Menu.MenuSearchControl = m); export const ContextMenuApi: t.ContextMenuApi = mapMangledModuleLazy('type:"CONTEXT_MENU_OPEN', { closeContextMenu: filters.byCode("CONTEXT_MENU_CLOSE"),