diff --git a/BTCPayServer/wwwroot/main/site.js b/BTCPayServer/wwwroot/main/site.js index c8099ff5c..a24167591 100644 --- a/BTCPayServer/wwwroot/main/site.js +++ b/BTCPayServer/wwwroot/main/site.js @@ -391,10 +391,16 @@ if (window.Blazor) { $title.textContent = isConnected ? 'Connection established' : 'Connection interrupted'; $body.innerHTML = isConnected ? '' : 'Please refresh the page.'; // use empty link on purpose $body.classList.toggle('d-none', isConnected); - if (!isConnected && !isUnloading) { + if (!isUnloading) { const toast = new bootstrap.Toast($status, { autohide: false }); - if (!toast.isShown()) - toast.show(); + if (isConnected) { + if (toast.isShown()) + toast.hide(); + } + else { + if (!toast.isShown()) + toast.show(); + } } }); }