From b789d252b9cd0bad7f9dd6c1e3173d5a33d0b423 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 2 Mar 2022 14:30:04 +0000 Subject: [PATCH] Add logging to diagnose non-disappearing toasts (#7947) For https://github.com/vector-im/element-web/issues/17667 --- src/DeviceListener.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/DeviceListener.ts b/src/DeviceListener.ts index cf5e493992..05f86453f1 100644 --- a/src/DeviceListener.ts +++ b/src/DeviceListener.ts @@ -297,8 +297,9 @@ export default class DeviceListener { } } - logger.log("Old unverified sessions: " + Array.from(oldUnverifiedDeviceIds).join(',')); - logger.log("New unverified sessions: " + Array.from(newUnverifiedDeviceIds).join(',')); + logger.debug("Old unverified sessions: " + Array.from(oldUnverifiedDeviceIds).join(',')); + logger.debug("New unverified sessions: " + Array.from(newUnverifiedDeviceIds).join(',')); + logger.debug("Currently showing toasts for: " + Array.from(this.displayingToastsForDeviceIds).join(',')); // Display or hide the batch toast for old unverified sessions if (oldUnverifiedDeviceIds.size > 0) { @@ -315,6 +316,7 @@ export default class DeviceListener { // ...and hide any we don't need any more for (const deviceId of this.displayingToastsForDeviceIds) { if (!newUnverifiedDeviceIds.has(deviceId)) { + logger.debug("Hiding unverified session toast for " + deviceId); hideUnverifiedSessionsToast(deviceId); } }