diff options
author | nmsturcke <30734036+nmsturcke@users.noreply.github.com> | 2022-11-21 19:10:46 +0100 |
---|---|---|
committer | nmsturcke <30734036+nmsturcke@users.noreply.github.com> | 2022-11-21 19:10:46 +0100 |
commit | 9831c8d6dadc510302d917015c875944d32dc858 (patch) | |
tree | f4b0fee2de386d1255b5d655aac62325b14dc875 /src | |
parent | 3a2e6a6fd4bfa09b68c38153a34c3b0f0d351f4f (diff) | |
download | Vencord-9831c8d6dadc510302d917015c875944d32dc858.tar.gz Vencord-9831c8d6dadc510302d917015c875944d32dc858.tar.bz2 Vencord-9831c8d6dadc510302d917015c875944d32dc858.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/components/PluginSettings/index.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
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<string, number>) => { + let [newPlugins, error, newPluginsLoading] = useAwaiter(() => DataStore.get("Vencord_existingPlugins").then((existingPlugins: Record<string, number>) => { const dateNow: number = Date.now() / 1000; const Vencord_existingPlugins: Record<string, number> = {}; const newPlugins: Array<string> = []; @@ -260,6 +260,10 @@ export default ErrorBoundary.wrap(function Settings() { return newPlugins; })); + if (JSON.stringify(newPlugins) === JSON.stringify(sortedPluginNames)) { + newPlugins = []; + } + return ( <Forms.FormSection tag="h1" title="Vencord"> <Forms.FormTitle tag="h5" className={classes(Margins.marginTop20, Margins.marginBottom8)}> |