mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-26 17:26:22 +00:00
fix(memberListActivities): use correct fetchApplication method
This commit is contained in:
parent
ad1d20a4bc
commit
d7404417be
1 changed files with 6 additions and 3 deletions
|
@ -22,7 +22,7 @@ import { classNameFactory } from "@api/Styles";
|
||||||
import ErrorBoundary from "@components/ErrorBoundary";
|
import ErrorBoundary from "@components/ErrorBoundary";
|
||||||
import { Devs } from "@utils/constants";
|
import { Devs } from "@utils/constants";
|
||||||
import definePlugin from "@utils/types";
|
import definePlugin from "@utils/types";
|
||||||
import { findStoreLazy } from "@webpack";
|
import { findByPropsLazy, findStoreLazy } from "@webpack";
|
||||||
|
|
||||||
import { SpotifyIcon } from "./components/SpotifyIcon";
|
import { SpotifyIcon } from "./components/SpotifyIcon";
|
||||||
import { TwitchIcon } from "./components/TwitchIcon";
|
import { TwitchIcon } from "./components/TwitchIcon";
|
||||||
|
@ -76,9 +76,12 @@ interface Executable {
|
||||||
|
|
||||||
const ApplicationStore: {
|
const ApplicationStore: {
|
||||||
getApplication: (id: string) => Application | null;
|
getApplication: (id: string) => Application | null;
|
||||||
fetchApplication: (id: string) => Promise<Application | null>;
|
|
||||||
} = findStoreLazy("ApplicationStore");
|
} = findStoreLazy("ApplicationStore");
|
||||||
|
|
||||||
|
const { fetchApplication }: {
|
||||||
|
fetchApplication: (id: string) => Promise<Application | null>;
|
||||||
|
} = findByPropsLazy("fetchApplication");
|
||||||
|
|
||||||
const fetchedApplications = new Map<string, Application | null>();
|
const fetchedApplications = new Map<string, Application | null>();
|
||||||
|
|
||||||
export default definePlugin({
|
export default definePlugin({
|
||||||
|
@ -134,7 +137,7 @@ export default definePlugin({
|
||||||
application = fetchedApplications.get(application_id) as Application | null;
|
application = fetchedApplications.get(application_id) as Application | null;
|
||||||
} else {
|
} else {
|
||||||
fetchedApplications.set(application_id, null);
|
fetchedApplications.set(application_id, null);
|
||||||
ApplicationStore.fetchApplication(application_id).then(app => {
|
fetchApplication(application_id).then(app => {
|
||||||
fetchedApplications.set(application_id, app);
|
fetchedApplications.set(application_id, app);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue