fix: apply warning fixes

This commit is contained in:
2025-04-22 20:28:36 +03:00
parent e9a200d543
commit 33959936d6
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -214,10 +214,9 @@ suspend fun getScheduleDay(
if ((type == ME.type) and (id == ME.unnId!!)) {
val schedule = withContext(Dispatchers.IO) { loadSchedule(date) }
Log.d("Schedule", schedule.joinToString())
if (schedule.size != 0) {
if (schedule.isNotEmpty())
return schedule
}
}
return getSchedule(type, id, date, date)
}
@@ -376,7 +376,7 @@ fun loadSchedule(oid: Int): ScheduleUnit? {
fun loadSchedule(date: LocalDate): ArrayList<ScheduleUnit> {
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(
db.scheduleDao().getSchedule(date.format(DateTimeFormatter.ISO_DATE))
.mapNotNull { loadSchedule(it.oid) }