From a061ebd1e94d235b533c1b5adb84b30d523285cd Mon Sep 17 00:00:00 2001 From: Kima Date: Thu, 25 Jan 2024 19:24:41 +0100 Subject: [PATCH] only show homework with deadline after today --- filcnaplo_mobile_ui/lib/pages/grades/grades_page.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/filcnaplo_mobile_ui/lib/pages/grades/grades_page.dart b/filcnaplo_mobile_ui/lib/pages/grades/grades_page.dart index b5decc7..7d1d845 100755 --- a/filcnaplo_mobile_ui/lib/pages/grades/grades_page.dart +++ b/filcnaplo_mobile_ui/lib/pages/grades/grades_page.dart @@ -128,7 +128,9 @@ class GradesPageState extends State { i++; int homeworkCount = homeworkProvider.homework - .where((e) => e.subject.id == subject.id) + .where((e) => + e.subject.id == subject.id && + e.deadline.isBefore(DateTime.now())) .length; bool hasHomework = homeworkCount > 0;