mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-10-31 00:01:23 +01:00 
			
		
		
		
	Return promises
This commit is contained in:
		
							parent
							
								
									a653fea020
								
							
						
					
					
						commit
						2040587826
					
				| @ -188,11 +188,20 @@ export default class AddThreepid { | ||||
|                         // pop up an interactive auth dialog
 | ||||
|                         const InteractiveAuthDialog = sdk.getComponent("dialogs.InteractiveAuthDialog"); | ||||
| 
 | ||||
|                         return new Promise((resolve, reject) => { | ||||
|                             Modal.createTrackedDialog('Add Email', '', InteractiveAuthDialog, { | ||||
|                                 title: _t("Add Email Address"), | ||||
|                                 matrixClient: MatrixClientPeg.get(), | ||||
|                                 authData: e.data, | ||||
|                                 makeRequest: this._makeAddThreepidOnlyRequest, | ||||
|                                 onFinished: (success) => { | ||||
|                                     if (success) { | ||||
|                                         resolve(); | ||||
|                                     } else { | ||||
|                                         reject(); | ||||
|                                     } | ||||
|                                 }, | ||||
|                             }); | ||||
|                         }); | ||||
|                     } | ||||
|                 } | ||||
| @ -280,11 +289,20 @@ export default class AddThreepid { | ||||
|                     // pop up an interactive auth dialog
 | ||||
|                     const InteractiveAuthDialog = sdk.getComponent("dialogs.InteractiveAuthDialog"); | ||||
| 
 | ||||
|                     return new Promise((resolve, reject) => { | ||||
|                         Modal.createTrackedDialog('Add MSISDN', '', InteractiveAuthDialog, { | ||||
|                             title: _t("Add Phone Number"), | ||||
|                             matrixClient: MatrixClientPeg.get(), | ||||
|                             authData: e.data, | ||||
|                             makeRequest: this._makeAddThreepidOnlyRequest, | ||||
|                             onFinished: (success) => { | ||||
|                                 if (success) { | ||||
|                                     resolve(); | ||||
|                                 } else { | ||||
|                                     reject(); | ||||
|                                 } | ||||
|                             }, | ||||
|                         }); | ||||
|                     }); | ||||
|                 } | ||||
|             } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user