@@ -29,6 +29,7 @@ import 'package:taskwarrior/app/utils/taskfunctions/comparator.dart';
2929import 'package:taskwarrior/app/utils/taskfunctions/projects.dart' ;
3030import 'package:taskwarrior/app/utils/taskfunctions/query.dart' ;
3131import 'package:taskwarrior/app/utils/taskfunctions/tags.dart' ;
32+ import 'package:taskwarrior/app/utils/taskfunctions/waiting.dart' ;
3233import 'package:taskwarrior/app/utils/app_settings/app_settings.dart' ;
3334import 'package:taskwarrior/app/v3/champion/replica.dart' ;
3435import 'package:taskwarrior/app/v3/champion/models/task_for_replica.dart' ;
@@ -43,6 +44,7 @@ class HomeController extends GetxController {
4344 final SplashController splashController = Get .find <SplashController >();
4445 late Storage storage;
4546 final RxBool pendingFilter = false .obs;
47+
4648 /// Which status the list is filtered to: pending / completed / deleted /
4749 /// recurring.
4850 /// Supersedes [pendingFilter] , which can only express the first two; that
@@ -263,11 +265,12 @@ class HomeController extends GetxController {
263265 queriedTasks.value = storage.data.completedData ();
264266 }
265267
268+ // The switch is labelled "Hide Waiting" while on, so on means waiting
269+ // tasks are left out (Taskwarrior's default), not that only they show.
266270 if (waitingFilter.value) {
267271 var currentTime = DateTime .now ();
268- queriedTasks.value = queriedTasks
269- .where ((task) => task.wait != null && task.wait! .isAfter (currentTime))
270- .toList ();
272+ queriedTasks.value =
273+ queriedTasks.where ((task) => ! isWaiting (task, currentTime)).toList ();
271274 }
272275
273276 if (projectFilter.value.isNotEmpty) {
@@ -736,8 +739,12 @@ class HomeController extends GetxController {
736739 HomeWidget .saveWidgetData (
737740 "themeMode" , AppSettings .isDarkMode ? "dark" : "light" );
738741 HomeWidget .updateWidget (
739- androidName: "TaskWarriorWidgetProvider" ,
740- iOSName: "TaskWarriorWidgets" );
742+ qualifiedAndroidName: kAndroidWidgetProvider,
743+ iOSName: "TaskWarriorWidgets" )
744+ .catchError ((Object e) {
745+ debugPrint ('Error updating widget theme: $e ' );
746+ return null ;
747+ });
741748 // print("called and value is${isDarkModeOn.value}");
742749 }
743750
@@ -795,8 +802,7 @@ class HomeController extends GetxController {
795802 /// Which projects column the filter drawer is currently showing. The two sit
796803 /// behind mutually exclusive `Visibility` widgets, so only one of
797804 /// [projectsKey] / [projectsKeyTaskc] is ever laid out.
798- bool get usesTaskchampionProjects =>
799- taskchampion.value || taskReplica.value;
805+ bool get usesTaskchampionProjects => taskchampion.value || taskReplica.value;
800806
801807 void initFilterDrawerTour () {
802808 tutorialCoachMark = TutorialCoachMark (
0 commit comments