From 90824d32c9c296fc48c25427ff6c17fbada1c44c Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 3 Sep 2021 15:14:44 +0100 Subject: [PATCH] Add logging to debug stuck toast bug For https://github.com/vector-im/element-web/issues/18603 --- src/DeviceListener.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/DeviceListener.ts b/src/DeviceListener.ts index 51c624e3c3..1a551d7813 100644 --- a/src/DeviceListener.ts +++ b/src/DeviceListener.ts @@ -100,6 +100,7 @@ export default class DeviceListener { * @param {String[]} deviceIds List of device IDs to dismiss notifications for */ async dismissUnverifiedSessions(deviceIds: Iterable) { + console.log("Dismissing unverified sessions: " + Array.from(deviceIds).join(',')); for (const d of deviceIds) { this.dismissed.add(d); } @@ -285,6 +286,9 @@ export default class DeviceListener { } } + console.log("Old unverified sessions: " + Array.from(oldUnverifiedDeviceIds).join(',')); + console.log("New unverified sessions: " + Array.from(newUnverifiedDeviceIds).join(',')); + // Display or hide the batch toast for old unverified sessions if (oldUnverifiedDeviceIds.size > 0) { showBulkUnverifiedSessionsToast(oldUnverifiedDeviceIds);