Prechádzať zdrojové kódy

主界面红点优化

guodong 1 rok pred
rodič
commit
6c576f7f18

+ 3 - 2
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -850,8 +850,6 @@ namespace GFGGame
             LogHelper.LogEditor($"MainUIView OnRedDotChanged GameGlobal.AfterDataInited {GameGlobal.AfterDataInited} AutoShowCompleted {AutoShowCompleted}");
             //暂时用这种方法优化下,红点的实现要重构!!!
             //LogHelper.LogEditor("MainUIView UpdateRedDot OnRedDotChanged");
-            if (!GameGlobal.AfterDataInited) return;
-            if (!AutoShowCompleted) return;
             redPointUpdateFrame = 0;
         }
 
@@ -859,6 +857,9 @@ namespace GFGGame
         private void UpdateRedDot()
         {
             if (redPointUpdateFrame < 0) return;
+            if (!GameGlobal.AfterDataInited) return;
+            if (!AutoShowCompleted) return;
+            if (!ViewManager.CheckIsTopView(this.viewCom)) return;
             LogHelper.LogEditor($"MainUIView UpdateRedDot redPointUpdateFrame {redPointUpdateFrame}");
             if (redPointUpdateFrame == 0)
                 _valueBarController.UpdateRedPoint();