Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit b789d25

Browse files
authored
Add logging to diagnose non-disappearing toasts (#7947)
For element-hq/element-web#17667
1 parent a394738 commit b789d25

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/DeviceListener.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,9 @@ export default class DeviceListener {
297297
}
298298
}
299299

300-
logger.log("Old unverified sessions: " + Array.from(oldUnverifiedDeviceIds).join(','));
301-
logger.log("New unverified sessions: " + Array.from(newUnverifiedDeviceIds).join(','));
300+
logger.debug("Old unverified sessions: " + Array.from(oldUnverifiedDeviceIds).join(','));
301+
logger.debug("New unverified sessions: " + Array.from(newUnverifiedDeviceIds).join(','));
302+
logger.debug("Currently showing toasts for: " + Array.from(this.displayingToastsForDeviceIds).join(','));
302303

303304
// Display or hide the batch toast for old unverified sessions
304305
if (oldUnverifiedDeviceIds.size > 0) {
@@ -315,6 +316,7 @@ export default class DeviceListener {
315316
// ...and hide any we don't need any more
316317
for (const deviceId of this.displayingToastsForDeviceIds) {
317318
if (!newUnverifiedDeviceIds.has(deviceId)) {
319+
logger.debug("Hiding unverified session toast for " + deviceId);
318320
hideUnverifiedSessionsToast(deviceId);
319321
}
320322
}

0 commit comments

Comments
 (0)