CanteenFragment.kt: replaced buttons for opening hours and canteen switch embedded in the app bar with floating action buttons; implemented a possible fix for the app crashing after refreshing the canteen plan. This may have been caused by accessing the view/context of the fragment to let the user know that the refresh succeeded or encountered an error. Reference will be null by the time the fragment is inactive, causing a NullPointerException

This commit is contained in:
denizk0461
2023-05-04 15:09:10 +02:00
parent 5ca5788899
commit e17a81e604
14 changed files with 165 additions and 142 deletions
@@ -35,7 +35,6 @@ class StudIPEventItemAdapter(
/**
* Retrieve an instance of Calendar to check whether the adapter's day matches the current day.
* TODO this can be optimised by checking in EventPageFragment.kt and delivering a boolean
*/
private val currentCalendar = Calendar.getInstance()