refactor: clenup
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user