From a62788c47bf9b30b947427a6fa62a5ed485ad5c6 Mon Sep 17 00:00:00 2001 From: Elvyra <88881326+EepyElvyra@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:20:24 +0100 Subject: [PATCH] im so tupid sometimes --- src/components/SearchModal.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/SearchModal.tsx b/src/components/SearchModal.tsx index 3264f8812..24584b1b8 100644 --- a/src/components/SearchModal.tsx +++ b/src/components/SearchModal.tsx @@ -32,7 +32,8 @@ import { useRef, UsernameUtils, UserStore, - useState + useState, + useStateFromStores } from "@webpack/common"; import { Channel, Guild, User } from "discord-types/general"; @@ -44,7 +45,6 @@ const TextTypes = findByPropsLazy("APPLICATION", "GROUP_DM", "GUILD"); const FrequencyModule = findByPropsLazy("getFrequentlyWithoutFetchingLatest"); const FrequentsModule = findByPropsLazy("getChannelHistory", "getFrequentGuilds"); -const wrapperFn = findByCodeLazy("prevDeps:void 0,"); const convertItem = findByCodeLazy("GROUP_DM:return{", "GUILD_VOICE:case"); const loadFunction = findByCodeLazy(".frecencyWithoutFetchingLatest)"); const SearchHandler = findByCodeLazy("createSearchContext", "setLimit"); @@ -494,7 +494,7 @@ export default function SearchModal({ modalProps, onSubmit, input, searchType = loadFunction(); - const frequentChannels: Channel[] = wrapperFn([FrequencyModule], () => FrequencyModule.getFrequentlyWithoutFetchingLatest()); + const frequentChannels: Channel[] = useStateFromStores([FrequencyModule], () => FrequencyModule.getFrequentlyWithoutFetchingLatest()); const hasQuery = query !== ""; function getItem(e: DestinationItem): Result {