|
@@ -545,10 +545,11 @@ export const setSection = (start: number, end: number, userSpeed?: number) => {
|
|
|
const lastEndId = endNotes[endNotes.length - 1].noteId
|
|
|
let lastEndNotes = endNotes.filter((n: any) => n.noteId === lastEndId)
|
|
|
// 是否符合重播规则
|
|
|
- const isCanRepeat = verifyCanRepeat(start, end)
|
|
|
+ const canRepeatInfo = verifyCanRepeat(start, end)
|
|
|
+ const isCanRepeat = canRepeatInfo.canRepeat
|
|
|
// 如果符合重播规则,但是lastEndNotes长度为1,则需要向前找,直到找到lastEndNotes长度为2
|
|
|
let currentEndNum: number = end
|
|
|
- const lastEndIndex = state.repeatInfo.last()?.end
|
|
|
+ const lastEndIndex = canRepeatInfo.repeatIdx
|
|
|
while (isCanRepeat && lastEndNotes.length === 1 && lastEndNotes[0].MeasureNumberXML <= lastEndIndex) {
|
|
|
currentEndNum = currentEndNum - 1
|
|
|
const newEndNotes = state.times.filter(
|