fix: 修复 Auth User 的状态问题, 返回正确的任务状态
							parent
							
								
									ba059e9995
								
							
						
					
					
						commit
						de58e5f6dd
					
				|  | @ -32,17 +32,23 @@ namespace Guru | |||
| 			FirebaseAuth.DefaultInstance.SignInWithCustomTokenAsync(authToken) | ||||
| 				.ContinueWithOnMainThread(task => | ||||
| 				{ | ||||
| 					// ----- Task failed -----  | ||||
| 					if (task.IsCanceled || task.IsFaulted) | ||||
| 					{ | ||||
| 						Log.E(LOG_TAG,"[Auth] SignInWithCustomTokenAsync encountered an error: " + task.Exception); | ||||
| 						CoroutineHelper.Instance.StartDelayed(_wait, AuthUser); | ||||
| 						OnFirebaseAuthResult?.Invoke(false); | ||||
| 						CoroutineHelper.Instance.StartDelayed(_wait, AuthUser); | ||||
| 						return; | ||||
| 					} | ||||
| 					else if (CurrentUser == null) | ||||
| 					// ----- User is NULL -----  | ||||
| 					if (CurrentUser == null) | ||||
| 					{ | ||||
| 						CoroutineHelper.Instance.StartDelayed(_wait, AuthUser); | ||||
| 						OnFirebaseAuthResult?.Invoke(false); | ||||
| 						CoroutineHelper.Instance.StartDelayed(_wait, AuthUser); | ||||
| 						return; | ||||
| 					} | ||||
| 					// ----- Success -----  | ||||
| 					OnFirebaseAuthResult?.Invoke(true); // 最后判定是成功的 | ||||
| 				}); | ||||
| 		} | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue