forked from github/szkolny
[Timetable] Fix showing "no timetable" when all nearest lessons are cancelled. Fix a crash in timetable fragment.
This commit is contained in:
parent
ae89b33fb7
commit
df1a241b2b
@ -166,8 +166,8 @@ class HomeTimetableCard(
|
||||
&& !(it.isCancelled && ignoreCancelled)
|
||||
}
|
||||
|
||||
if (lessons.isEmpty() && timetableDate.weekDay <= 5)
|
||||
break
|
||||
//if (lessons.isEmpty() && timetableDate.weekDay <= 5)
|
||||
// break
|
||||
|
||||
checkedDays++
|
||||
}
|
||||
|
@ -124,6 +124,8 @@ class TimetableFragment : Fragment(), CoroutineScope {
|
||||
endHour = lessonRanges.map { it.endTime.hour }.max()?.plus(1) ?: DEFAULT_END_HOUR
|
||||
}
|
||||
deferred.await()
|
||||
if (!isAdded)
|
||||
return@launch
|
||||
|
||||
val pagerAdapter = TimetablePagerAdapter(
|
||||
fragmentManager ?: return@launch,
|
||||
|
@ -229,8 +229,8 @@ class WidgetTimetableProvider : AppWidgetProvider() {
|
||||
&& !(it.isCancelled && ignoreCancelled)
|
||||
}
|
||||
|
||||
if (lessons.isEmpty() && timetableDate.weekDay <= 5)
|
||||
break
|
||||
//if (lessons.isEmpty() && timetableDate.weekDay <= 5)
|
||||
// break
|
||||
|
||||
checkedDays++
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user