Skip to content

Commit

Permalink
Fix SSE failure toast container not removed (#2075)
Browse files Browse the repository at this point in the history
Fixes #2069.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
  • Loading branch information
florian-h05 authored Sep 18, 2023
1 parent d2685e9 commit cf3b218
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bundles/org.openhab.ui/web/src/components/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,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',
Expand Down Expand Up @@ -796,15 +796,13 @@ 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)
}
} else if (mutation.payload === true) {
if (this.communicationFailureTimeoutId !== null) clearTimeout(this.communicationFailureTimeoutId)
if (this.communicationFailureToast !== null) {
this.communicationFailureToast.close()
this.communicationFailureToast.destroy()
this.communicationFailureToast = null
}
}
Expand Down

0 comments on commit cf3b218

Please sign in to comment.