()
| 71 | } |
| 72 | |
| 73 | override async revert(): Promise<void> { |
| 74 | const history = this.engine.history('video') as string[]; |
| 75 | for (let i = history.length - 1; i >= 0; i--) { |
| 76 | const last = history[i]; |
| 77 | const [, , name] = last.split(' '); |
| 78 | if (name === this.name) { |
| 79 | const action = this.engine.prepareAction(last, { cycle: 'Application' }) as ActionInstance | null; |
| 80 | if (action !== null) { |
| 81 | await action.willApply(); |
| 82 | await action.apply(); |
| 83 | await action.didApply({ updateHistory: false, updateState: true }); |
| 84 | } |
| 85 | return; |
| 86 | } |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | override async didRevert(): Promise<ActionRevertResult> { |
| 91 | return { advance: true, step: true }; |
nothing calls this directly
no test coverage detected