1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-11 20:22:36 +03:00

Add logging to diagnose non-disappearing toasts (#7947)

For https://github.com/vector-im/element-web/issues/17667
This commit is contained in:
David Baker
2022-03-02 14:30:04 +00:00
committed by GitHub
parent a39473810a
commit b789d252b9

View File

@@ -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);
}
}