refactor: clenup
This commit is contained in:
@@ -260,8 +260,12 @@ private fun LessonSlot(slotIndex: Int, slot: TimeSlot) {
|
|||||||
style = MaterialTheme.typography.bodyLarge
|
style = MaterialTheme.typography.bodyLarge
|
||||||
)
|
)
|
||||||
Text(
|
Text(
|
||||||
listOf(lesson.type.label, lesson.subgroup, lesson.teacher, lesson.room)
|
listOfNotNull(
|
||||||
.filterNotNull()
|
lesson.type.label,
|
||||||
|
lesson.subgroup,
|
||||||
|
lesson.teacher,
|
||||||
|
lesson.room
|
||||||
|
)
|
||||||
.filter { it.isNotBlank() }
|
.filter { it.isNotBlank() }
|
||||||
.joinToString(" · "),
|
.joinToString(" · "),
|
||||||
style = MaterialTheme.typography.bodySmall,
|
style = MaterialTheme.typography.bodySmall,
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class ScheduleViewModel(
|
|||||||
|
|
||||||
val dayDate = when {
|
val dayDate = when {
|
||||||
weekDays.any { it.date == current.dayDate } -> current.dayDate
|
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
|
else -> weekDays.firstOrNull()?.date
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user