diff --git a/lua/app/ui/activity/seven_day/seven_day_ui.lua b/lua/app/ui/activity/seven_day/seven_day_ui.lua index 242b54fa..b488c7b5 100644 --- a/lua/app/ui/activity/seven_day/seven_day_ui.lua +++ b/lua/app/ui/activity/seven_day/seven_day_ui.lua @@ -53,8 +53,10 @@ end function SevenDayUI:initTop() self.dayTextList = {} + self.dayLockList = {} self.stepObjs = {} for i = 1, 7 do + self.dayLockList[i] = self.uiMap["seven_day_ui.day_bg.lock_" .. i] self.dayTextList[i] = self.uiMap["seven_day_ui.day_bg.day_" .. i] self.dayTextList[i]:setText(I18N:getGlobalText(I18N.GlobalConst.DAY_X, i)) self.dayTextList[i]:addClickListener(function() @@ -122,10 +124,16 @@ function SevenDayUI:refreshDay() if i == self.day then self.daySelectImg:setAnchoredPositionX(self.dayTextList[i]:fastGetAnchoredPositionX()) end - if DataManager.SevenDayData:showRedPoint(i) and i <= actDay then - self.dayTextList[i]:addRedPoint(40, 26, 0.5) - else + if i > actDay then + self.dayLockList[i]:setVisible(true) self.dayTextList[i]:removeRedPoint() + else + self.dayLockList[i]:setVisible(false) + if DataManager.SevenDayData:showRedPoint(i) then + self.dayTextList[i]:addRedPoint(40, 26, 0.5) + else + self.dayTextList[i]:removeRedPoint() + end end end end