Skip to content

Commit f216f08

Browse files
committed
Remove redundant operating hours rotation
1 parent 0f9d903 commit f216f08

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

app/src/main/java/com/cornellappdev/transit/ui/viewmodels/HomeViewModel.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,8 @@ class HomeViewModel @Inject constructor(
367367
val rotatedOperatingHours = rotateOperatingHours(operatingHours)
368368

369369
val currentTime = currentDateTime.toLocalTime()
370-
val todaySchedule = rotatedOperatingHours[0].hours // First day should be today after rotation
370+
val todaySchedule =
371+
rotatedOperatingHours[0].hours // First day should be today after rotation
371372

372373
// Check if closed today
373374
if (todaySchedule.any { it.equals("Closed", ignoreCase = true) }) {
@@ -453,9 +454,7 @@ class HomeViewModel @Inject constructor(
453454
*/
454455
fun isOpenAnnotatedStringFromOperatingHours(operatingHours: List<DayOperatingHours>): AnnotatedString {
455456
return getOpenStatusAnnotatedString(
456-
getOpenStatus(
457-
rotateOperatingHours(operatingHours)
458-
)
457+
getOpenStatus(operatingHours)
459458
)
460459
}
461460

0 commit comments

Comments
 (0)