Re-Apply: Fix SSE failure toast container not removed (#2182)

This re-applies the fix from #2075, which must have been lost while
rebasing #1987.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
pull/2183/head
Florian Hotze 2023-11-22 15:23:52 +01:00 committed by GitHub
parent 9981c87410
commit d8e29f1386
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -24,7 +24,7 @@ export default {
text: message,
closeButton: reloadButton,
closeButtonText: this.$t('dialogs.reload'),
destroyOnClose: autoClose,
destroyOnClose: true,
closeTimeout: (autoClose) ? 5000 : undefined,
cssClass: 'failure-toast button-outline',
position: 'bottom',
@ -51,7 +51,6 @@ export default {
this.communicationFailureTimeoutId = setTimeout(() => {
if (this.communicationFailureToast !== null) return
this.communicationFailureToast = this.displayFailureToast(this.$t('error.communicationFailure'), true, false)
this.communicationFailureToast.open()
this.communicationFailureTimeoutId = null
}, 1000)
}
@ -59,7 +58,6 @@ export default {
if (this.communicationFailureTimeoutId !== null) clearTimeout(this.communicationFailureTimeoutId)
if (this.communicationFailureToast !== null) {
this.communicationFailureToast.close()
this.communicationFailureToast.destroy()
this.communicationFailureToast = null
}
}