@@ -62,6 +62,8 @@ export default class DeviceListener {
62
62
private dispatcherRef ?: string ;
63
63
// device IDs for which the user has dismissed the verify toast ('Later')
64
64
private dismissed = new Set < string > ( ) ;
65
+ /** Have we shown the user an encryption setup toast? */
66
+ private shownThisDeviceToast = false ;
65
67
// has the user dismissed any of the various nag toasts to setup encryption on this device?
66
68
private dismissedThisDeviceToast = false ;
67
69
/** Cache of the info about the current key backup on the server. */
@@ -134,6 +136,7 @@ export default class DeviceListener {
134
136
this . dispatcherRef = undefined ;
135
137
}
136
138
this . dismissed . clear ( ) ;
139
+ this . shownThisDeviceToast = false ;
137
140
this . dismissedThisDeviceToast = false ;
138
141
this . keyBackupInfo = null ;
139
142
this . keyBackupFetchedAt = null ;
@@ -313,7 +316,7 @@ export default class DeviceListener {
313
316
hideSetupEncryptionToast ( ) ;
314
317
315
318
this . checkKeyBackupStatus ( ) ;
316
- } else if ( this . shouldShowSetupEncryptionToast ( ) ) {
319
+ } else if ( this . shouldShowSetupEncryptionToast ( ) && ! this . shownThisDeviceToast ) {
317
320
// make sure our keys are finished downloading
318
321
await crypto . getUserDeviceInfo ( [ cli . getSafeUserId ( ) ] ) ;
319
322
@@ -341,6 +344,7 @@ export default class DeviceListener {
341
344
}
342
345
}
343
346
}
347
+ this . shownThisDeviceToast = true ;
344
348
}
345
349
346
350
// This needs to be done after awaiting on getUserDeviceInfo() above, so
0 commit comments