Commit 867e76f78366d5f9086204317b670dc58c6ab261

Authored by xiaoyu
2 parents 2b3842c5 42cf5d28

Merge branch 'feat-wqf-payment' into ios_umeng

lib/pages/section/bloc/section_bloc.dart
@@ -67,9 +67,12 @@ class SectionBloc extends Bloc<SectionEvent, SectionState> { @@ -67,9 +67,12 @@ class SectionBloc extends Bloc<SectionEvent, SectionState> {
67 RequestDataEvent event, Emitter<SectionState> emitter) async { 67 RequestDataEvent event, Emitter<SectionState> emitter) async {
68 try { 68 try {
69 await loading(() async { 69 await loading(() async {
70 - _courseSectionDatasMap[event.courseUnitId] =  
71 - await LessonDao.courseSection(courseUnitId: event.courseUnitId);  
72 - emitter(LessonDataLoadState()); 70 + List<CourseSectionEntity>? courseSectionEntities = await LessonDao.courseSection(courseUnitId: event.courseUnitId);
  71 + if (courseSectionEntities != null) {
  72 + _courseSectionDatasMap[event.courseUnitId] =
  73 + await LessonDao.courseSection(courseUnitId: event.courseUnitId);
  74 + emitter(LessonDataLoadState());
  75 + }
73 }); 76 });
74 } catch (e) { 77 } catch (e) {
75 if (e is ApiException) { 78 if (e is ApiException) {