Browse Source

添加华容道,画廊,好友界面的异步加载完成后,后续函数执行的条件

leiyasi 1 year ago
parent
commit
5954ecc388

+ 6 - 1
GameClient/Assets/Game/HotUpdate/Views/ActivityHuaRongDao/ActivityHuaRongDaoEntryView.cs

@@ -38,7 +38,6 @@ namespace GFGGame
 
         public override void Dispose()
         {
-            Timers.inst.Remove(UpdateTime);
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -55,8 +54,14 @@ namespace GFGGame
             _ui.m_hide.Play();
             _activityID = (int)viewData;
             await InitInfo();
+
+            if (!isShowing)
+            {
+                return;
+            }
             _ui.m_show.Play();
             UpdateTime(null);
+            Timers.inst.Remove(UpdateTime);
             Timers.inst.Add(1, 0, UpdateTime);
         }
 

+ 5 - 0
GameClient/Assets/Game/HotUpdate/Views/Poem/PoemGalleryView.cs

@@ -216,6 +216,11 @@ namespace GFGGame
             if (PoemGalleryDataManager.Instance.HasBonus)
             {
                 bool result = await PoemGallerySProxy.ReqGetGalleryRankBonus();
+                if (!isShowing)
+                {
+                    return;
+                }
+
                 if (result && PoemGalleryDataManager.Instance.MyWorksRanks.Count > 0)
                 {
                     ViewManager.Show<PoemGalleryRewardGetView>();

+ 4 - 0
GameClient/Assets/Game/HotUpdate/Views/RoleInfo/OtherRoleInfoView.cs

@@ -51,6 +51,10 @@ namespace GFGGame
 
             _ui.m_Hide.Play();
             _roleDetailInfo = await RoleInfoSProxy.ReqOtherRoleDetailInfo(_roleInfo.roleId);
+            if (!isShowing)
+            {
+                return;
+            }
             _ui.m_Show.Play();
             _roleInfo = _roleDetailInfo.roleInfo;
             if (_roleDetailInfo != null)