Fixed a bug that would cause the tab for a day without canteen offers to not be shown, causing the offers for the next days to be shifted over, thus not showing the offers for the last day that's available online. I know I didn't explain that very well, but it's fixed now anyway, soo (: also made some minor visual adjustments to margins and colours

This commit is contained in:
denizk0461
2023-04-20 21:35:09 +02:00
parent 07a2902367
commit b39aa1f003
11 changed files with 88 additions and 64 deletions
@@ -66,6 +66,9 @@ interface EventDAO {
@get:Query("SELECT id FROM offer_date")
val updateObserver: LiveData<List<Int>>
@Query("SELECT * FROM offer_date")
fun getDates(): List<OfferDate>
@Query("DELETE FROM offer_date")
fun nukeOfferDates()
@@ -21,6 +21,8 @@ class EventRepository(app: Application) {
val allOffers: LiveData<List<CanteenOffer>> = dao.allOffers
fun getDates(): List<OfferDate> = dao.getDates()
fun getDietaryPrefs(): String {
return prefs.getString(dietaryPrefString, "..........") ?: ".........."
// return DietaryPrefObject(