fixed mensa screen crash if day has no meals
This commit is contained in:
parent
fe111ac56b
commit
77757ad9ca
@ -78,7 +78,9 @@ class MensaFragment : Fragment() {
|
||||
for (dayIndex in dayStart..4) {
|
||||
var helpMeal = MealLinearLayout(context)
|
||||
val dayCardView = DayCardView(context!!)
|
||||
dayCardView.setDayHeading(menusWeek.days[dayIndex].meals[0].day)
|
||||
|
||||
if(menusWeek.days[dayIndex].meals.isNotEmpty())
|
||||
dayCardView.setDayHeading(menusWeek.days[dayIndex].meals[0].day)
|
||||
|
||||
for (meal in menusWeek.days[dayIndex].meals) {
|
||||
val mealLayout = MealLinearLayout(context)
|
||||
|
Loading…
Reference in New Issue
Block a user