Commit af6af3c571848843e6913742ebca01efccc5242f

Authored by 吴启风
1 parent 6c23b545

fix: 修复播完环节后跨单元跳错下一环节的问题

sortOrder是单元内编号,原逻辑跨所有已缓存单元按sortOrder+1全局查找,
会命中前一个单元的同序号环节(如播完本单元儿歌却跳到上一单元看视频)。
统一改为在当前单元内查找下一个环节,单元学完仍走原有下一单元兜底逻辑。
lib/pages/section/bloc/section_bloc.dart
... ... @@ -215,12 +215,10 @@ class SectionBloc extends Bloc<SectionEvent, SectionState> {
215 215 .toList();
216 216 }
217 217  
  218 + ///查找当前unit内当前环节的下一个环节
  219 + ///sortOrder是unit内编号,不能跨unit全局按sortOrder查找,否则会命中前一个unit的同序号环节
218 220 CourseSectionEntity? _findNextVisibleCourseSection(
219 221 CourseSectionEntity currentSection) {
220   - if (!UserUtil.isAppReviewAccount()) {
221   - return findCourseSectionBySort(currentSection.sortOrder + 1);
222   - }
223   -
224 222 final currentUnitSections =
225 223 _courseSectionDatasMap[currentSection.courseUnitId];
226 224 final nextSections = currentUnitSections
... ...