Fix FavoriteGifSearch & broken Menu component find

This commit is contained in:
Nuckyz 2025-09-08 22:18:39 -03:00
parent 4e8d22b4d5
commit 50eb62045a
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 2 additions and 8 deletions

View file

@ -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<any>;
ref?: React.RefObject<any>;
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
<SearchBarComponent
ref={ref}
autoFocus={true}
className={containerClasses.searchBar}
size="md"
onChange={onChange}
onClear={() => {

View file

@ -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"),