feat: Remove automatic selection of the first project after fetching projects
This commit is contained in:
parent
11d9f107ad
commit
4022197b7f
@ -57,10 +57,8 @@ class DailyTaskController extends GetxController {
|
||||
}
|
||||
|
||||
projects = response!.map((json) => ProjectModel.fromJson(json)).toList();
|
||||
selectedProjectId = projects.first.id.toString();
|
||||
log.i("Projects fetched: ${projects.length} projects loaded.");
|
||||
update();
|
||||
await fetchTaskData(selectedProjectId);
|
||||
}
|
||||
|
||||
Future<void> fetchTaskData(String? projectId) async {
|
||||
|
@ -121,11 +121,8 @@ class DailyTaskPlaningController extends GetxController {
|
||||
}
|
||||
|
||||
projects = response!.map((json) => ProjectModel.fromJson(json)).toList();
|
||||
selectedProjectId = projects.first.id.toString();
|
||||
log.i("Projects fetched: ${projects.length} projects loaded.");
|
||||
update();
|
||||
|
||||
await fetchTaskData(selectedProjectId);
|
||||
} catch (e, stack) {
|
||||
log.e("Error fetching projects", error: e, stackTrace: stack);
|
||||
} finally {
|
||||
|
Loading…
x
Reference in New Issue
Block a user