Skip to content

Commit

Permalink
Fix: Loading Twice
Browse files Browse the repository at this point in the history
  • Loading branch information
ntut-xuan committed Feb 29, 2024
1 parent 4609d06 commit ed39f4c
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/ui/pages/coursedetail/screen/course_info_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class _CourseInfoPageState extends State<CourseInfoPage> with AutomaticKeepAlive
super.initState();
isLoading = true;
BackButtonInterceptor.add(myInterceptor);
Future.microtask(() => _loadCourseStudent());
Future.delayed(Duration.zero, () {
_addTask();
});
Expand Down Expand Up @@ -228,16 +227,6 @@ class _CourseInfoPageState extends State<CourseInfoPage> with AutomaticKeepAlive
return <String, String>{};
}

void _loadCourseStudent() async {
TaskFlow taskFlow = TaskFlow();
final courseMainInfo = widget.courseInfo.main;
final task = IPlusGetStudentListTask(courseId: courseMainInfo.course.id);
taskFlow.addTask(task);
if (await taskFlow.start()) {
task.result;
}
}

String getDepartment(Map<String, String> departmentMap, String studentId) {
/*
* Since we don't have official data to describe the following hard-coded rule is correct.
Expand Down

0 comments on commit ed39f4c

Please sign in to comment.