Skip to content

Commit

Permalink
speeding up the notification process
Browse files Browse the repository at this point in the history
  • Loading branch information
tpkowastaken committed Nov 8, 2023
1 parent cd0f443 commit 84b5411
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/methods_vars/notifications.dart
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,11 @@ Future<void> doNotifications({bool force = false}) async {
//7 is limit for how many lunches we are gonna search for
int objednano = 0;
int cena = 0;
List<Future<Jidelnicek>> jidelnickyFuture = [];
for (int i = 0; i < 10; i++) {
jidelnickyFuture.add(loggedInCanteen.getLunchesForDay(DateTime.now().add(Duration(days: i))));
}
await Future.wait(jidelnickyFuture);
for (int denIndex = 0; denIndex < 10; denIndex++) {
Jidelnicek jidelnicek = await loggedInCanteen.getLunchesForDay(DateTime.now().add(Duration(days: denIndex)));
//pokud nalezneme jídlo s cenou
Expand Down

0 comments on commit 84b5411

Please sign in to comment.