From b75c39e0b0c654f4f431c2d142dafcb2f642db2f Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期五, 21 九月 2018 20:56:17 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/SystemSetting/ActivityPushCell.cs | 21 ++++++++-------------
1 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/System/SystemSetting/ActivityPushCell.cs b/System/SystemSetting/ActivityPushCell.cs
index a725677..3481223 100644
--- a/System/SystemSetting/ActivityPushCell.cs
+++ b/System/SystemSetting/ActivityPushCell.cs
@@ -12,20 +12,22 @@
[SerializeField] GameObject bgObj;
SetPrivateModel privateModel { get { return ModelCenter.Instance.GetModel<SetPrivateModel>(); } }
+ DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
public void SetModel(int dailyId)
{
string title = "";
string weekDay = "";
string openTime = "";
- privateModel.GetDailyInfoById(dailyId,out title,out weekDay,out openTime);
+ privateModel.GetDailyInfoById(dailyId, out title, out weekDay, out openTime);
nameText.text = title;
weekDayText.text = weekDay;
timeText.text = openTime;
- int index = privateModel.GetSwitchIndexById(dailyId);
- pushBtn.SetInit(index,privateModel.GetSwitchStateByIndex(index));
- pushBtn.switchBtn.RemoveAllListeners();
- pushBtn.switchBtn.AddListener(() =>
+
+ var quests = dailyQuestModel.GetDailyQuests(DailyQuestModel.DailyQuestCategory.TimeLimit);
+ int index = privateModel.GetSwitchIndexById(dailyId, quests);
+ pushBtn.SetInit(index, privateModel.GetSwitchStateByIndex(index));
+ pushBtn.switchBtn.SetListener(() =>
{
if (pushBtn.onObj.activeInHierarchy)
{
@@ -41,14 +43,7 @@
}
});
- if(this.index % 2 == 0)
- {
- bgObj.SetActive(true);
- }
- else
- {
- bgObj.SetActive(false);
- }
+ bgObj.SetActive(this.index % 2 == 0);
}
}
}
--
Gitblit v1.8.0