Discard toast on /api connect

880233122c1351c67864970ea0f9e687f97319bc

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -1Showing whitespace changes
public/script.js+2 -1
@@ -8514,7 +8514,7 @@ async function connectAPISlash(args, text) {
85148514 }
85158515
85168516 const quiet = isTrueBoolean(args?.quiet);
85178517 const toast = quiet ? jQuery() : toastr.info(`API set to ${text}, trying to connect..`);
85188518
85198519 try {
85208520 await waitUntilCondition(() => online_status !== 'no_connection', 10000, 100);
@@ -8523,6 +8523,7 @@ async function connectAPISlash(args, text) {
85238523 console.log('Could not connect after 10 seconds, skipping.');
85248524 }
85258525
8526+ toastr.clear(toast);
85268527 return '';
85278528}
85288529