mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-11-04 10:11:03 +01:00 
			
		
		
		
	Fix incorrect toast if security setup skipped
DevieListener didn't wait for the user's device list to be downloaded so it would think the user didn't have cross-signing set up. Also clear the rest of the state on stop(). Fixes https://github.com/vector-im/riot-web/issues/13372
This commit is contained in:
		
							parent
							
								
									7b9c46a5a9
								
							
						
					
					
						commit
						d550f6c564
					
				@ -66,6 +66,9 @@ export default class DeviceListener {
 | 
				
			|||||||
            MatrixClientPeg.get().removeListener('sync', this._onSync);
 | 
					            MatrixClientPeg.get().removeListener('sync', this._onSync);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        this._dismissed.clear();
 | 
					        this._dismissed.clear();
 | 
				
			||||||
 | 
					        this._dismissedThisDeviceToast = false;
 | 
				
			||||||
 | 
					        this._keyBackupInfo = null;
 | 
				
			||||||
 | 
					        this._keyBackupFetchedAt = null;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    dismissVerification(deviceId) {
 | 
					    dismissVerification(deviceId) {
 | 
				
			||||||
@ -146,6 +149,8 @@ export default class DeviceListener {
 | 
				
			|||||||
            ToastStore.sharedInstance().dismissToast(THIS_DEVICE_TOAST_KEY);
 | 
					            ToastStore.sharedInstance().dismissToast(THIS_DEVICE_TOAST_KEY);
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            if (!crossSigningReady) {
 | 
					            if (!crossSigningReady) {
 | 
				
			||||||
 | 
					                // make sure our keys are finished downlaoding
 | 
				
			||||||
 | 
					                await cli.downloadKeys([cli.getUserId()]);
 | 
				
			||||||
                // cross signing isn't enabled - nag to enable it
 | 
					                // cross signing isn't enabled - nag to enable it
 | 
				
			||||||
                // There are 3 different toasts for:
 | 
					                // There are 3 different toasts for:
 | 
				
			||||||
                if (cli.getStoredCrossSigningForUser(cli.getUserId())) {
 | 
					                if (cli.getStoredCrossSigningForUser(cli.getUserId())) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user