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

Commit

Permalink
Add logging to diagnose non-disappearing toasts
Browse files Browse the repository at this point in the history
  • Loading branch information
dbkr committed Mar 2, 2022
1 parent b480bff commit 316b34b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/DeviceListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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);
}
}
Expand Down

0 comments on commit 316b34b

Please sign in to comment.