fixed mensa screen crash if day has no meals
This commit is contained in:
		@ -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)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user