Skip to content

Commit

Permalink
fix: 修复校历无法显示问题
Browse files Browse the repository at this point in the history
修复了当校历数据为空时导致的校历无法显示问题,将判断数据是否为空的
逻辑移动到数据处理完成后。
  • Loading branch information
Mystery00 committed Oct 8, 2024
1 parent 408d2ae commit 9c8ba53
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,6 @@ object AggregationLocalRepo : KoinComponent {
): List<CalendarWeekResponse> {
val map = HashMap<LocalDate, MutableList<CalendarDayItemResponse>>(180)

if (map.isEmpty()) {
return emptyList()
}

//课程列表
queryAndMap(
query = {
Expand Down Expand Up @@ -297,6 +293,10 @@ object AggregationLocalRepo : KoinComponent {
)
}
})

if (map.isEmpty()) {
return emptyList()
}
//组装数据结构
val maxDate = minOf(map.keys.max(), startDate.plusWeeks(20))
val result = ArrayList<CalendarWeekResponse>()
Expand Down

0 comments on commit 9c8ba53

Please sign in to comment.