Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
[UI > Settings] Fix alert race condition (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
nexpid authored Oct 20, 2023
1 parent 8352072 commit 43d351c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ui/settings/data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,16 @@ export const getScreens = (youKeys = false): Screen[] => [
alertTitle="Install Plugin"
installFunction={async (input) => {
if (!input.startsWith(PROXY_PREFIX) && !settings.developerSettings)
showConfirmationAlert({
setImmediate(() => showConfirmationAlert({
title: "Unproxied Plugin",
content: "The plugin you are trying to install has not been proxied/verified by Vendetta staff. Are you sure you want to continue?",
confirmText: "Install",
onConfirm: () =>
installPlugin(input)
.then(() => showToast("Installed plugin", getAssetIDByName("Check")))
.catch((x) => showToast(x.toString(), getAssetIDByName("Small"))),
.catch((x) => showToast(x?.message ?? `${x}`, getAssetIDByName("Small"))),
cancelText: "Cancel",
});
}));
else return await installPlugin(input);
}}
/>
Expand Down

0 comments on commit 43d351c

Please sign in to comment.