|
@@ -261,7 +261,7 @@ namespace GFGGame
|
|
|
|
|
|
}
|
|
|
|
|
|
- public static void QuitToLoginView(bool logout)
|
|
|
+ public static void QuitToLoginView(bool logout, bool fromSdkLogoutCallback = false)
|
|
|
{
|
|
|
FieldDataManager.Instance.waitToShowFieldFightEndView = false;
|
|
|
GameGlobal.AutoSevenDayLoginView = true;
|
|
@@ -313,8 +313,14 @@ namespace GFGGame
|
|
|
GameGlobal.zoneScene.GetComponent<AccountInfoComponent>()?.Clear();
|
|
|
if (logout)
|
|
|
{
|
|
|
- QDManager.Logout();
|
|
|
- PlayerPrefs.DeleteKey(GameConst.PASSWORD_LAST_LOGIN_KEY);
|
|
|
+ if (PlayerPrefs.HasKey(GameConst.PASSWORD_LAST_LOGIN_KEY))
|
|
|
+ {
|
|
|
+ PlayerPrefs.DeleteKey(GameConst.PASSWORD_LAST_LOGIN_KEY);
|
|
|
+ }
|
|
|
+ if (!fromSdkLogoutCallback)
|
|
|
+ {
|
|
|
+ QDManager.Logout();
|
|
|
+ }
|
|
|
}
|
|
|
ViewManager.Hide<GuideView>();
|
|
|
ViewManager.Show<LoginView>(null, null, true);
|