()
| 54 | } |
| 55 | |
| 56 | override async didApply(): Promise<ActionApplyResult> { |
| 57 | let found = false; |
| 58 | this.engine.state({ |
| 59 | videos: this.engine.state('videos').filter((item: string) => { |
| 60 | if (!found) { |
| 61 | const [, , name] = item.split(' '); |
| 62 | if (name === this.name) { |
| 63 | found = true; |
| 64 | return false; |
| 65 | } |
| 66 | } |
| 67 | return true; |
| 68 | }) |
| 69 | }); |
| 70 | return { advance: true }; |
| 71 | } |
| 72 | |
| 73 | override async revert(): Promise<void> { |
| 74 | const history = this.engine.history('video') as string[]; |