Browse Source

修改好友界面详细页返回后,保持跳转前选中的好友

leiyasi 1 year ago
parent
commit
46d31e61e4
1 changed files with 8 additions and 3 deletions
  1. 8 3
      GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs

+ 8 - 3
GameClient/Assets/Game/HotUpdate/Views/Friend/FriendView.cs

@@ -69,7 +69,12 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-            _friendRoleId = this.viewData == null ? 0 : (long)this.viewData;
+
+            if (backRefresh)
+            {
+                _friendRoleId = this.viewData == null ? 0 : (long)this.viewData;
+            }
+            
             if (_sceneObject == null)
             {
                 CustomSuitData customSuit = CustomSuitDataManager.GetSuitList(CustomSuitDataManager.currentIndex);
@@ -308,12 +313,12 @@ namespace GFGGame
         {
             if (_friendRoleId == 0)
             {
-                ViewManager.Show<RoleInfoView>();
+                ViewManager.Show<RoleInfoView>(null,false,false);
             }
             else
             {
                 FriendInfoData friendInfoData = FriendDataManager.Instance.GetFriendDataById(_friendRoleId);
-                ViewManager.Show<OtherRoleInfoView>(new object[] { friendInfoData.roleInfo, friendInfoData.roleDetailInfo });
+                ViewManager.Show<OtherRoleInfoView>(new object[] { friendInfoData.roleInfo, friendInfoData.roleDetailInfo },false,false);
             }
         }
         private void OnBtnAddClick()