|
@@ -151,7 +151,7 @@ namespace GFGGame
|
|
|
EventAgent.AddEventListener(ConstMessage.CHANGE_ROLE_HEAD, UpdateHead);
|
|
|
EventAgent.AddEventListener(ConstMessage.RESET_DAILY_DATA, ResetDailyData);
|
|
|
EventAgent.AddEventListener(ConstMessage.AFU_GIFT_CHANGED, ChangeAfuActivityState);
|
|
|
- EventAgent.AddEventListener(ConstMessage.SEVEN_DAY_LOGIN_VIEW_CLOSED, CheckAutoShowViews);
|
|
|
+ EventAgent.AddEventListener(ConstMessage.VIEW_CLOSED, CheckAutoShowViews);
|
|
|
EventAgent.AddEventListener(ConstMessage.AFTER_DATA_INITED, OnFaterDataInited);
|
|
|
}
|
|
|
|
|
@@ -163,7 +163,7 @@ namespace GFGGame
|
|
|
EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, OnRedDotChanged);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.CHANGE_ROLE_HEAD, UpdateHead);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.AFU_GIFT_CHANGED, ChangeAfuActivityState);
|
|
|
- EventAgent.RemoveEventListener(ConstMessage.SEVEN_DAY_LOGIN_VIEW_CLOSED, CheckAutoShowViews);
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.VIEW_CLOSED, CheckAutoShowViews);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.AFTER_DATA_INITED, OnFaterDataInited);
|
|
|
}
|
|
|
|
|
@@ -234,6 +234,10 @@ namespace GFGGame
|
|
|
{
|
|
|
GameController.AfterShowMainUI();
|
|
|
}
|
|
|
+ else
|
|
|
+ {
|
|
|
+ OnRedDotChanged();
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private void OnFaterDataInited()
|
|
@@ -843,6 +847,7 @@ namespace GFGGame
|
|
|
|
|
|
private void OnRedDotChanged()
|
|
|
{
|
|
|
+ LogHelper.LogEditor($"MainUIView OnRedDotChanged GameGlobal.AfterDataInited {GameGlobal.AfterDataInited} AutoShowCompleted {AutoShowCompleted}");
|
|
|
//暂时用这种方法优化下,红点的实现要重构!!!
|
|
|
//LogHelper.LogEditor("MainUIView UpdateRedDot OnRedDotChanged");
|
|
|
if (!GameGlobal.AfterDataInited) return;
|
|
@@ -854,7 +859,7 @@ namespace GFGGame
|
|
|
private void UpdateRedDot()
|
|
|
{
|
|
|
if (redPointUpdateFrame < 0) return;
|
|
|
- LogHelper.LogEditor("MainUIView UpdateRedDot");
|
|
|
+ LogHelper.LogEditor($"MainUIView UpdateRedDot redPointUpdateFrame {redPointUpdateFrame}");
|
|
|
if (redPointUpdateFrame == 0)
|
|
|
_valueBarController.UpdateRedPoint();
|
|
|
if (redPointUpdateFrame == 1)
|
|
@@ -1024,13 +1029,16 @@ namespace GFGGame
|
|
|
private void ResetDailyData()
|
|
|
{
|
|
|
CheckFunOpen();
|
|
|
- redPointUpdateFrame = 0;
|
|
|
+ OnRedDotChanged();
|
|
|
UpdateHead();
|
|
|
UpdateBtnFirstRecharge();
|
|
|
CheckAutoShowViews();
|
|
|
}
|
|
|
private void CheckAutoShowViews()
|
|
|
{
|
|
|
+ if (AutoShowCompleted) return;
|
|
|
+ if (!GameGlobal.AfterDataInited) return;
|
|
|
+ if (!ViewManager.CheckIsTopView(this.viewCom)) return;
|
|
|
//if (!TimeUtil.CheckIsSameTime(lastTime * 1000, TimeHelper.ClientNow()))
|
|
|
if (GameGlobal.AutoSevenDayLoginView)
|
|
|
{
|