From c4f16591161bfc261a9c7fd34b0525962481bb75 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 29 Jan 2020 15:22:05 +0100 Subject: [PATCH] don't dismiss toasts for device verification as they are immediately started --- src/components/views/toasts/VerificationRequestToast.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/views/toasts/VerificationRequestToast.js b/src/components/views/toasts/VerificationRequestToast.js index 342b7d840c..d7b2880b92 100644 --- a/src/components/views/toasts/VerificationRequestToast.js +++ b/src/components/views/toasts/VerificationRequestToast.js @@ -56,7 +56,10 @@ export default class VerificationRequestToast extends React.PureComponent { _checkRequestIsPending = () => { const {request} = this.props; - if (request.ready || request.started || request.done || request.cancelled || request.observeOnly) { + const isPendingInRoomRequest = request.channel.roomId && + !(request.ready || request.started || request.done || request.cancelled || request.observeOnly); + const isPendingDeviceRequest = request.channel.deviceId && request.started; + if (!isPendingInRoomRequest && !isPendingDeviceRequest) { ToastStore.sharedInstance().dismissToast(this.props.toastKey); } };