fix: apply warning fixes

This commit is contained in:
Sweetbread 2025-04-22 20:28:36 +03:00
parent 08949c5f0d
commit 1ede1a4c2d
Signed by: Sweetbread
GPG Key ID: 17A5CB9A7DD85319
2 changed files with 2 additions and 3 deletions

View File

@ -214,9 +214,8 @@ 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)

View File

@ -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) }