fix: apply warning fixes

This commit is contained in:
Sweetbread committed 2025-04-22 20:28:36 +03:00
1 parent 08949c5f0d
commit 1ede1a4c2d
2 files changed
+2 -3

No files matched your search

+1 -2
View File
@@ -214,10 +214,9 @@ suspend fun getScheduleDay(
if ((type == ME.type) and (id == ME.unnId!!)) { if ((type == ME.type) and (id == ME.unnId!!)) {
val schedule = withContext(Dispatchers.IO) { loadSchedule(date) } val schedule = withContext(Dispatchers.IO) { loadSchedule(date) }
Log.d("Schedule", schedule.joinToString()) Log.d("Schedule", schedule.joinToString())
if (schedule.size != 0) { if (schedule.isNotEmpty())
return schedule return schedule
} }
}
return getSchedule(type, id, date, date) return getSchedule(type, id, date, date)
} }
@@ -376,7 +376,7 @@ fun loadSchedule(oid: Int): ScheduleUnit? {
fun loadSchedule(date: LocalDate): ArrayList<ScheduleUnit> { fun loadSchedule(date: LocalDate): ArrayList<ScheduleUnit> {
db.scheduleDao().getSchedule(date.format(DateTimeFormatter.ISO_DATE)) db.scheduleDao().getSchedule(date.format(DateTimeFormatter.ISO_DATE))
.mapNotNull { Log.d("meow", "${it.oid}: ${loadSchedule(it.oid)}") } .map { Log.d("meow", "${it.oid}: ${loadSchedule(it.oid)}") }
return ArrayList( return ArrayList(
db.scheduleDao().getSchedule(date.format(DateTimeFormatter.ISO_DATE)) db.scheduleDao().getSchedule(date.format(DateTimeFormatter.ISO_DATE))
.mapNotNull { loadSchedule(it.oid) } .mapNotNull { loadSchedule(it.oid) }