Fix Plugin Searching
This commit is contained in:
parent
14e4026d1b
commit
d060b861a7
2 changed files with 2 additions and 11 deletions
|
|
@ -197,18 +197,9 @@ export default function PluginSettings() {
|
|||
const hasUserPlugins = useMemo(() => !IS_STANDALONE && Object.values(PluginMeta).some(m => m.userPlugin), []);
|
||||
|
||||
const [searchValue, setSearchValue] = useState({ value: "", tags: [] as PluginTag[], status: SearchStatus.ALL });
|
||||
const [searchInput, setSearchInput] = useState("");
|
||||
|
||||
const debouncedSetSearch = useMemo(
|
||||
() => debounce((query: string) => setSearchValue(prev => ({ ...prev, value: query })), 150),
|
||||
[]
|
||||
);
|
||||
|
||||
const search = searchValue.value.toLowerCase();
|
||||
const onSearch = useCallback((query: string) => {
|
||||
setSearchInput(query);
|
||||
debouncedSetSearch(query);
|
||||
}, [debouncedSetSearch]);
|
||||
const onSearch = (query: string) => setSearchValue(prev => ({ ...prev, value: query }));
|
||||
|
||||
const pluginFilter = useCallback((plugin: typeof Plugins[keyof typeof Plugins], newPluginsSet: Set<string> | null) => {
|
||||
const { status, tags } = searchValue;
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ export default definePlugin({
|
|||
async start() {
|
||||
if (!VencordNative.pluginHelpers.UserpluginInstaller) return void Alerts.show({
|
||||
title: "UserpluginInstaller not fully loaded",
|
||||
body: "This usually happens if you didn't fully restart your client after installing the plugin, which prevents the native helpers from loading. Restart your client to fix the issue.",
|
||||
body: "You need to restart to allow the native to be loaded :)",
|
||||
confirmText: "Restart now",
|
||||
onConfirm() {
|
||||
relaunch();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue