From 9831c8d6dadc510302d917015c875944d32dc858 Mon Sep 17 00:00:00 2001 From: nmsturcke <30734036+nmsturcke@users.noreply.github.com> Date: Mon, 21 Nov 2022 19:10:46 +0100 Subject: Remove badges from plugins if all are new Don't adding the new badge to all plugins as it is *theoretically* impossible for all of them to be new at once. --- src/components/PluginSettings/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/components/PluginSettings/index.tsx b/src/components/PluginSettings/index.tsx index 6d3a752..e0f1815 100644 --- a/src/components/PluginSettings/index.tsx +++ b/src/components/PluginSettings/index.tsx @@ -246,7 +246,7 @@ export default ErrorBoundary.wrap(function Settings() { ); }; - const [newPlugins, error, newPluginsLoading] = useAwaiter(() => DataStore.get("Vencord_existingPlugins").then((existingPlugins: Record) => { + let [newPlugins, error, newPluginsLoading] = useAwaiter(() => DataStore.get("Vencord_existingPlugins").then((existingPlugins: Record) => { const dateNow: number = Date.now() / 1000; const Vencord_existingPlugins: Record = {}; const newPlugins: Array = []; @@ -260,6 +260,10 @@ export default ErrorBoundary.wrap(function Settings() { return newPlugins; })); + if (JSON.stringify(newPlugins) === JSON.stringify(sortedPluginNames)) { + newPlugins = []; + } + return ( -- cgit