diff --git a/packages/uni_app/lib/controller/local_storage/database/app_restaurant_database.dart b/packages/uni_app/lib/controller/local_storage/database/app_restaurant_database.dart index 70c15204f..045c19fed 100644 --- a/packages/uni_app/lib/controller/local_storage/database/app_restaurant_database.dart +++ b/packages/uni_app/lib/controller/local_storage/database/app_restaurant_database.dart @@ -70,7 +70,11 @@ class RestaurantDatabase extends AppDatabase> { } }); - return filterPastMeals(restaurants); + // TODO: reimplement the filter. + + // return filterPastMeals(restaurants); + + return restaurants; } Future> getRestaurantMeals( diff --git a/packages/uni_app/lib/model/providers/lazy/restaurant_provider.dart b/packages/uni_app/lib/model/providers/lazy/restaurant_provider.dart index 258633ae2..a4b70a388 100644 --- a/packages/uni_app/lib/model/providers/lazy/restaurant_provider.dart +++ b/packages/uni_app/lib/model/providers/lazy/restaurant_provider.dart @@ -9,20 +9,13 @@ import 'package:uni/model/providers/state_providers.dart'; class RestaurantProvider extends StateProviderNotifier> { RestaurantProvider() : super(cacheDuration: const Duration(days: 1)); - // @override - // Future> loadFromStorage( - // StateProviders stateProviders, - // ) async { - // final restaurantDb = RestaurantDatabase(); - // final restaurants = await restaurantDb.getRestaurants(); - // return restaurants; - // } - @override Future> loadFromStorage( StateProviders stateProviders, ) async { - return loadFromRemote(stateProviders); + final restaurantDb = RestaurantDatabase(); + final restaurants = await restaurantDb.getRestaurants(); + return restaurants; } @override @@ -33,6 +26,8 @@ class RestaurantProvider extends StateProviderNotifier> { final db = RestaurantDatabase(); unawaited(db.saveIfPersistentSession(restaurants)); + // TODO: enable past meals filtering after SASUP publishes the new menus (ALSO CHANGE IN THE STORAGE DATABASE!!!!). + // return filterPastMeals(restaurants); return restaurants; }