1
0
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:
Paul Nettleton 2022-08-02 19:35:26 -05:00
parent fe1076e2a1
commit 2e40f41bce

View File

@ -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);