From c209811f9fd61ec36ef94c43545d01e8edc83dee Mon Sep 17 00:00:00 2001 From: lishuo Date: Mon, 18 Jul 2022 18:37:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E8=B4=A6=E5=8F=B7=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/Prefab/Login/DeleteAccount.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/UI/Prefab/Login/DeleteAccount.cs b/Assets/Scripts/UI/Prefab/Login/DeleteAccount.cs index e4a3e8fa..a89b3886 100644 --- a/Assets/Scripts/UI/Prefab/Login/DeleteAccount.cs +++ b/Assets/Scripts/UI/Prefab/Login/DeleteAccount.cs @@ -1,7 +1,6 @@ using Assets.Scripts; +using System.Linq; using Assets.Scripts.UI.Control; -using System.Collections; -using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; @@ -30,6 +29,10 @@ public class DeleteAccount : PFUIPanel var res1 = await ConfigHelper.userApi.DeleteAccount(pwd, false); if (res1.result) { + var userinfos = UIManager.Instance.userInfos; + UIManager.Instance.userInfos = userinfos.Where(x => x.Phone != App.CurrentUser.Phone).ToList(); + var index = PlayerPrefs.GetInt("UserInfoIndex"); + PlayerPrefs.SetInt("UserInfoIndex", (index - 1) >= 0 ? (index - 1) : 0); #if !(UNITY_ANDROID || UNITY_IOS) SceneManager.LoadScene("Login"); #else