Fixed? a key bug related to pulling the right day

This commit is contained in:
2023-06-14 13:02:27 +04:00
parent bbbe05ed3e
commit 2195a5324c
2 changed files with 5 additions and 4 deletions
@@ -21,7 +21,7 @@ class _DayViewState extends State<DayView> {
late CategoriesAPI categories;
late List<Document> entries = [];
late Document? dayEntry;
late Document? dayEntry = null;
late List<num> hours = [];
late num? mood = 0;
late String comments = "";
@@ -61,7 +61,9 @@ class _DayViewState extends State<DayView> {
format: "LLL d", dateISO: dayEntry?.data['date'].toString());
print("Got entry for $date");
} catch (e) {
database.getOne(date: formattedDate).then((value) => dayEntry = value);
database.getOne(date: formattedDate).then((value) {
dayEntry = value;
});
}
setState(() {