mirror of
https://github.com/go-vikunja/app
synced 2024-06-02 18:49:47 +00:00
fixed typo, removed unnecessary print statements
This commit is contained in:
parent
2b86e98812
commit
7db2cc1e67
|
@ -81,7 +81,6 @@ class Client {
|
||||||
[Map<String, List<String>>? queryParameters]) {
|
[Map<String, List<String>>? queryParameters]) {
|
||||||
Uri uri = Uri.tryParse('${this.base}$url')!;
|
Uri uri = Uri.tryParse('${this.base}$url')!;
|
||||||
// why are we doing it like this? because Uri doesnt have setters. wtf.
|
// why are we doing it like this? because Uri doesnt have setters. wtf.
|
||||||
print(uri.toString());
|
|
||||||
|
|
||||||
uri = Uri(
|
uri = Uri(
|
||||||
scheme: uri.scheme,
|
scheme: uri.scheme,
|
||||||
|
|
|
@ -93,20 +93,11 @@ class TaskAPIService extends APIService implements TaskService {
|
||||||
Map<String, List<String>> optionsMap = options.getOptions();
|
Map<String, List<String>> 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";
|
//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);
|
//print(optionString);
|
||||||
Map<String, List<String>> queryparams = {
|
|
||||||
"sort_by[]":["due_date", "id"],
|
|
||||||
"order_by[]":["asc", "desc"],
|
|
||||||
"filter_by[]": ["done"],
|
|
||||||
"filter_value[]":["false"],
|
|
||||||
"filter_comparator[]":["equals"],
|
|
||||||
"filter_concat[]":["and"],
|
|
||||||
};
|
|
||||||
return client
|
return client
|
||||||
.get('/tasks/all', optionsMap)
|
.get('/tasks/all', optionsMap)
|
||||||
.then((response) {
|
.then((response) {
|
||||||
if (response == null) return null;
|
if (response == null) return null;
|
||||||
print(response.body);
|
|
||||||
print(response.headers);
|
|
||||||
return convertList(response.body, (result) => Task.fromJson(result));
|
return convertList(response.body, (result) => Task.fromJson(result));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -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));
|
texts.add(TextSpan(text: "Due " + durationToHumanReadable(durationUntilDue!), style: durationUntilDue.isNegative ? TextStyle(color: Colors.red) : null));
|
||||||
}
|
}
|
||||||
if(task.priority != null && task.priority != 0) {
|
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) {
|
if(texts.isEmpty && task.description.isNotEmpty) {
|
||||||
|
|
|
@ -246,7 +246,6 @@ class LandingPageState extends State<LandingPage>
|
||||||
Future<void> _handleTaskList(List<Task>? taskList, bool showOnlyDueDateTasks) {
|
Future<void> _handleTaskList(List<Task>? taskList, bool showOnlyDueDateTasks) {
|
||||||
if(showOnlyDueDateTasks)
|
if(showOnlyDueDateTasks)
|
||||||
taskList?.removeWhere((element) => element.dueDate == null || element.dueDate!.year == 0001);
|
taskList?.removeWhere((element) => element.dueDate == null || element.dueDate!.year == 0001);
|
||||||
taskList?.forEach((element) {print(element.title);});
|
|
||||||
|
|
||||||
if (taskList != null && taskList.isEmpty) {
|
if (taskList != null && taskList.isEmpty) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
|
@ -13,7 +13,7 @@ priorityToString(int? priority) {
|
||||||
case 5:
|
case 5:
|
||||||
return 'DO NOW';
|
return 'DO NOW';
|
||||||
default:
|
default:
|
||||||
return null;
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user