消息通知bug&赛事界面调整
This commit is contained in:
1 parent
50fd9c3af6
commit
9ab8165630
15 files changed
+182
-93
No files matched your search
@@ -164,7 +164,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
|
||||
#region 骑行结束,比赛结果展示数据
|
||||
var results = new List<CompetitionResultModel>();
|
||||
if (recorderData.IsCompleted || recorderData.Saved || mapCompetition.HasRecord || CanQuit())
|
||||
if (recorderData.IsCompleted || recorderData.Saved || mapCompetition.HasRecord || CanShowTopList())
|
||||
{
|
||||
var users1 = userList.Where(d => d.IsCompleted || d.Saved);
|
||||
if ((users1.Any() && users1.Any(d => mapWorkoutRecordRankings.All(u => u.UserId != d.Id)))
|
||||
@@ -212,7 +212,7 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
|
||||
List<CompetitionTopModel> CompetitionTopList = new List<CompetitionTopModel>();
|
||||
|
||||
var resultList =results.Take(6);
|
||||
var resultList = results.Take(6);
|
||||
var count = 6 - resultList.Count();
|
||||
//先取比赛结果
|
||||
foreach (var item in resultList)
|
||||
@@ -321,6 +321,18 @@ namespace Assets.Scenes.Ride.Scripts.Model.CyclingModels
|
||||
return end2 <= 0;
|
||||
}
|
||||
|
||||
public bool CanShowTopList()
|
||||
{
|
||||
var end1 = (int)Math.Floor((mapCompetition.EndTime.ToLocalTime() - Now).TotalSeconds);
|
||||
if (!FirstEndTime.HasValue)
|
||||
{
|
||||
return end1 <= 0;
|
||||
}
|
||||
|
||||
var end2 = (int)Math.Floor((FirstEndTime.Value.ToLocalTime() - Now).TotalSeconds);
|
||||
return end2 <= 0;
|
||||
}
|
||||
|
||||
public bool CanStart()
|
||||
{
|
||||
if (mapCompetition == null)
|
||||
|
||||
Reference in new issue
Block a user