From 7db2cc1e671c4cedde54e4b4c2df7738060bafe7 Mon Sep 17 00:00:00 2001 From: Benimautner Date: Sun, 3 Dec 2023 21:21:28 +0100 Subject: [PATCH] fixed typo, removed unnecessary print statements --- lib/api/client.dart | 1 - lib/api/task_implementation.dart | 11 +---------- lib/components/TaskTile.dart | 2 +- lib/pages/landing_page.dart | 1 - lib/utils/priority.dart | 2 +- 5 files changed, 3 insertions(+), 14 deletions(-) diff --git a/lib/api/client.dart b/lib/api/client.dart index 506a43a..740e486 100644 --- a/lib/api/client.dart +++ b/lib/api/client.dart @@ -81,7 +81,6 @@ class Client { [Map>? queryParameters]) { Uri uri = Uri.tryParse('${this.base}$url')!; // why are we doing it like this? because Uri doesnt have setters. wtf. - print(uri.toString()); uri = Uri( scheme: uri.scheme, diff --git a/lib/api/task_implementation.dart b/lib/api/task_implementation.dart index 7221edf..44c7823 100644 --- a/lib/api/task_implementation.dart +++ b/lib/api/task_implementation.dart @@ -93,20 +93,11 @@ class TaskAPIService extends APIService implements TaskService { Map> optionsMap = options.getOptions(); //optionString = "?sort_by[]=due_date&sort_by[]=id&order_by[]=asc&order_by[]=desc&filter_by[]=done&filter_value[]=false&filter_comparator[]=equals&filter_concat=and&filter_include_nulls=false&page=1"; //print(optionString); - Map> queryparams = { - "sort_by[]":["due_date", "id"], - "order_by[]":["asc", "desc"], - "filter_by[]": ["done"], - "filter_value[]":["false"], - "filter_comparator[]":["equals"], - "filter_concat[]":["and"], - }; + return client .get('/tasks/all', optionsMap) .then((response) { if (response == null) return null; - print(response.body); - print(response.headers); return convertList(response.body, (result) => Task.fromJson(result)); }); } diff --git a/lib/components/TaskTile.dart b/lib/components/TaskTile.dart index 3e04991..7441721 100644 --- a/lib/components/TaskTile.dart +++ b/lib/components/TaskTile.dart @@ -47,7 +47,7 @@ Widget? _buildTaskSubtitle(Task? task, bool showInfo) { texts.add(TextSpan(text: "Due " + durationToHumanReadable(durationUntilDue!), style: durationUntilDue.isNegative ? TextStyle(color: Colors.red) : null)); } if(task.priority != null && task.priority != 0) { - texts.add(TextSpan(text: " !" + priorityToString(task.projectId), style: TextStyle(color: Colors.orange))); + texts.add(TextSpan(text: " !" + priorityToString(task.priority), style: TextStyle(color: Colors.orange))); } if(texts.isEmpty && task.description.isNotEmpty) { diff --git a/lib/pages/landing_page.dart b/lib/pages/landing_page.dart index 838dfb9..75b63d6 100644 --- a/lib/pages/landing_page.dart +++ b/lib/pages/landing_page.dart @@ -246,7 +246,6 @@ class LandingPageState extends State Future _handleTaskList(List? taskList, bool showOnlyDueDateTasks) { if(showOnlyDueDateTasks) taskList?.removeWhere((element) => element.dueDate == null || element.dueDate!.year == 0001); - taskList?.forEach((element) {print(element.title);}); if (taskList != null && taskList.isEmpty) { setState(() { diff --git a/lib/utils/priority.dart b/lib/utils/priority.dart index fca35d9..7e1d827 100644 --- a/lib/utils/priority.dart +++ b/lib/utils/priority.dart @@ -13,7 +13,7 @@ priorityToString(int? priority) { case 5: return 'DO NOW'; default: - return null; + return ""; } }