From 9c8ba533cda84665563e41e571c1ee83125f6fc0 Mon Sep 17 00:00:00 2001 From: Mystery0 Date: Tue, 8 Oct 2024 21:17:17 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=A0=A1=E5=8E=86?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复了当校历数据为空时导致的校历无法显示问题,将判断数据是否为空的 逻辑移动到数据处理完成后。 --- .../timetable/repository/local/AggregationLocalRepo.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/vip/mystery0/xhu/timetable/repository/local/AggregationLocalRepo.kt b/app/src/main/java/vip/mystery0/xhu/timetable/repository/local/AggregationLocalRepo.kt index 5367598..56f5a5f 100644 --- a/app/src/main/java/vip/mystery0/xhu/timetable/repository/local/AggregationLocalRepo.kt +++ b/app/src/main/java/vip/mystery0/xhu/timetable/repository/local/AggregationLocalRepo.kt @@ -206,10 +206,6 @@ object AggregationLocalRepo : KoinComponent { ): List { val map = HashMap>(180) - if (map.isEmpty()) { - return emptyList() - } - //课程列表 queryAndMap( query = { @@ -297,6 +293,10 @@ object AggregationLocalRepo : KoinComponent { ) } }) + + if (map.isEmpty()) { + return emptyList() + } //组装数据结构 val maxDate = minOf(map.keys.max(), startDate.plusWeeks(20)) val result = ArrayList()