refactor: clenup

This commit is contained in:
2026-09-03 20:54:44 +03:00
parent 32f93197ab
commit 1fc43bb8fc
2 changed files with 7 additions and 3 deletions
@@ -260,8 +260,12 @@ private fun LessonSlot(slotIndex: Int, slot: TimeSlot) {
style = MaterialTheme.typography.bodyLarge
)
Text(
listOf(lesson.type.label, lesson.subgroup, lesson.teacher, lesson.room)
.filterNotNull()
listOfNotNull(
lesson.type.label,
lesson.subgroup,
lesson.teacher,
lesson.room
)
.filter { it.isNotBlank() }
.joinToString(" · "),
style = MaterialTheme.typography.bodySmall,
@@ -81,7 +81,7 @@ class ScheduleViewModel(
val dayDate = when {
weekDays.any { it.date == current.dayDate } -> current.dayDate
weekDays.any { it.date == todayDate && todayDate != null } -> todayDate
weekDays.any { it.date == todayDate } -> todayDate
else -> weekDays.firstOrNull()?.date
}