lvjincheng 3 лет назад
Родитель
Сommit
c505edd544

+ 3 - 3
Assets/BowArrow/Scripts/Network/UserPlayer.cs

@@ -119,11 +119,11 @@ public class UserPlayer : JCEntity
             else AuthLoginMask.ins?.SetAutoRetryFail();
             else AuthLoginMask.ins?.SetAutoRetryFail();
         }));
         }));
     }
     }
-    private bool _hasGetUserInfo = false;
+    public bool hasGetUserInfo;
     private void DoAfterGetUserInfo(UserInfo userInfo)
     private void DoAfterGetUserInfo(UserInfo userInfo)
     {
     {
-        if (_hasGetUserInfo) return;
-        _hasGetUserInfo = true;
+        if (hasGetUserInfo) return;
+        hasGetUserInfo = true;
         LoginMgr.myUserInfo = userInfo;
         LoginMgr.myUserInfo = userInfo;
 
 
         if (HomeView.ins) {
         if (HomeView.ins) {

+ 2 - 2
Assets/BowArrow/Scripts/View/Home/HomeView.cs

@@ -169,7 +169,7 @@ public class HomeView : JCUnityLib.ViewBase
         if (friendBarContent == null) {
         if (friendBarContent == null) {
             friendBarContent = transform.Find("FriendBar/Scroll View/Viewport/Content");
             friendBarContent = transform.Find("FriendBar/Scroll View/Viewport/Content");
         }
         }
-        while (UserPlayer.ins == null || !UserPlayer.ins.loginAuthed) {
+        while (UserPlayer.ins == null || !UserPlayer.ins.loginAuthed || !UserPlayer.ins.hasGetUserInfo) {
             yield return null;
             yield return null;
         }
         }
         Action<JArray> cb = RenderFriendList;
         Action<JArray> cb = RenderFriendList;
@@ -215,7 +215,7 @@ public class HomeView : JCUnityLib.ViewBase
         if (friendBarContent == null) {
         if (friendBarContent == null) {
             friendBarContent = transform.Find("FriendBar/Scroll View/Viewport/Content");
             friendBarContent = transform.Find("FriendBar/Scroll View/Viewport/Content");
         }
         }
-        while (UserPlayer.ins == null || !UserPlayer.ins.loginAuthed) {
+        while (UserPlayer.ins == null || !UserPlayer.ins.loginAuthed || !UserPlayer.ins.hasGetUserInfo) {
             yield return null;
             yield return null;
         }
         }
         Action<JArray> cb = RenderFriendRankList;
         Action<JArray> cb = RenderFriendRankList;