MCPcopy Create free account
hub / github.com/Monogatari/Monogatari / didApply

Method didApply

src/actions/HideVideo.ts:56–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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[];

Callers 1

revertMethod · 0.45

Calls 1

stateMethod · 0.80

Tested by

no test coverage detected