Просмотр исходного кода

Merge branch 'feature-tianyong' into gym-test

TIANYONG 9 месяцев назад
Родитель
Сommit
3b746b529d
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      src/state.ts

+ 3 - 1
src/state.ts

@@ -641,7 +641,9 @@ export const onPlay = () => {
 /** 播放模式结束自动重播 */
 const autoResetPlay = () => {
   if (state.modeType !== "practise") return;
-  skipNotePlay(0, true);
+  // 如果是选段需要跳转到预备小节或者选段内的第一小节,否则跳转到第一小节
+  const targetIdx = state.section.length === 2 ? state.sectionFirst?.i || state.section[1].i : 0;
+  skipNotePlay(targetIdx, true);
   // 没有开启自动重播, 不是练习模式
   if (!state.setting.repeatAutoPlay) return;
   offsetTop = 0;