From d212ef76f45e96d89e9dcf35142f3a0bc4a34ca4 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 22 Jun 2021 14:08:06 +0200 Subject: [PATCH] Fix unload warning with pending messages Only display a warning when leaving the page completely, which would abort pending sending operations. Switching between conversations will keep sending in the background so no warning is needed. Signed-off-by: Vincent Petry --- src/App.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index c40ce360769..fbb847040c8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -31,7 +31,7 @@ - + @@ -109,8 +109,12 @@ export default { return this.$store.getters.getUserId() }, + isSendingMessages() { + return this.$store.getters.isSendingMessages + }, + warnLeaving() { - return this.$store.getters.isSendingMessages || (!this.isLeavingAfterSessionIssue && this.isInCall) + return !this.isLeavingAfterSessionIssue && this.isInCall }, /**