@@ -105,14 +105,22 @@ class _StorageWidgetState extends State<StorageWidget> {
105105
106106 void _refreshTasks () {
107107 if (pendingFilter) {
108- queriedTasks = storage.data.pendingData ().where ((task) => task.status == 'pending' ).toList ();
108+ queriedTasks = storage.data
109+ .pendingData ()
110+ .where ((task) => task.status == 'pending' )
111+ .toList ();
109112 } else {
110113 queriedTasks = storage.data.completedData ();
111114 }
112115
113116 if (waitingFilter) {
114117 var currentTime = DateTime .now ();
115- queriedTasks = queriedTasks.where ((task) => task.wait != null && task.wait! .isAfter (currentTime)).toList ();
118+ queriedTasks = queriedTasks
119+ .where ((task) =>
120+ task.wait == null ||
121+ task.wait! .isBefore (currentTime) ||
122+ task.wait! .isAtSameMomentAs (currentTime))
123+ .toList ();
116124 }
117125
118126 if (projectFilter.isNotEmpty) {
@@ -131,11 +139,13 @@ class _StorageWidgetState extends State<StorageWidget> {
131139 if (selectedTags.isEmpty) {
132140 return true ;
133141 }
134- return selectedTags
135- .any ((tag) => (tag.startsWith ('+' )) ? tags.contains (tag.substring (1 )) : ! tags.contains (tag.substring (1 )));
142+ return selectedTags.any ((tag) => (tag.startsWith ('+' ))
143+ ? tags.contains (tag.substring (1 ))
144+ : ! tags.contains (tag.substring (1 )));
136145 } else {
137- return selectedTags
138- .every ((tag) => (tag.startsWith ('+' )) ? tags.contains (tag.substring (1 )) : ! tags.contains (tag.substring (1 )));
146+ return selectedTags.every ((tag) => (tag.startsWith ('+' ))
147+ ? tags.contains (tag.substring (1 ))
148+ : ! tags.contains (tag.substring (1 )));
139149 }
140150 }).toList ();
141151
@@ -156,7 +166,8 @@ class _StorageWidgetState extends State<StorageWidget> {
156166 searchedTasks = searchedTasks
157167 .where ((task) =>
158168 task.description.contains (searchTerm) ||
159- (task.annotations? .asList () ?? []).any ((annotation) => annotation.description.contains (searchTerm)))
169+ (task.annotations? .asList () ?? []).any (
170+ (annotation) => annotation.description.contains (searchTerm)))
160171 .toList ();
161172 }
162173 pendingTags = _pendingTags ();
@@ -537,7 +548,8 @@ class InheritedStorage extends InheritedModel<String> {
537548 }
538549
539550 @override
540- bool updateShouldNotifyDependent (InheritedStorage oldWidget, Set <String > dependencies) {
551+ bool updateShouldNotifyDependent (
552+ InheritedStorage oldWidget, Set <String > dependencies) {
541553 return true ;
542554 }
543555}
0 commit comments