mirror of
https://github.com/go-vikunja/app
synced 2024-06-05 20:19:51 +00:00
minor add task to bucket fix
This commit is contained in:
parent
fe1076e2a1
commit
2e40f41bce
|
@ -112,9 +112,9 @@ class ListProvider with ChangeNotifier {
|
|||
notifyListeners();
|
||||
|
||||
return globalState.taskService.add(listId, newTask).then((task) {
|
||||
if (newTask.bucketId == null) {
|
||||
if (_tasks.isNotEmpty)
|
||||
_tasks.insert(0, task);
|
||||
} else {
|
||||
if (_buckets.isNotEmpty) {
|
||||
final bucket = _buckets[_buckets.indexWhere((b) => task.bucketId == b.id)];
|
||||
if (bucket.tasks != null) {
|
||||
bucket.tasks.add(task);
|
||||
|
|
Loading…
Reference in New Issue
Block a user