mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 19:04:38 -06:00
[UI/Timetable] Fix non-null cast exception.
This commit is contained in:
parent
8f8d613f6e
commit
5d3de35c10
@ -120,7 +120,7 @@ class TimetableDayFragment : Fragment(), CoroutineScope {
|
||||
private fun processLessonList(lessons: List<LessonFull>, events: List<EventFull>) {
|
||||
// no lessons - timetable not downloaded yet
|
||||
if (lessons.isEmpty()) {
|
||||
inflater.inflate(R.layout.timetable_no_timetable, view as FrameLayout) { view, _, parent ->
|
||||
inflater.inflate(R.layout.timetable_no_timetable, view as FrameLayout?) { view, _, parent ->
|
||||
parent?.removeAllViews()
|
||||
parent?.addView(view)
|
||||
val b = TimetableNoTimetableBinding.bind(view)
|
||||
@ -143,7 +143,7 @@ class TimetableDayFragment : Fragment(), CoroutineScope {
|
||||
}
|
||||
// one lesson indicating a day without lessons
|
||||
if (lessons.size == 1 && lessons[0].type == Lesson.TYPE_NO_LESSONS) {
|
||||
inflater.inflate(R.layout.timetable_no_lessons, view as FrameLayout) { view, _, parent ->
|
||||
inflater.inflate(R.layout.timetable_no_lessons, view as FrameLayout?) { view, _, parent ->
|
||||
parent?.removeAllViews()
|
||||
parent?.addView(view)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user