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

Method apply

src/actions/Gallery.ts:22–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 }
21
22 override async apply(): Promise<void> {
23 Registry.instances('gallery-screen', (instance: any) => {
24 const unlocked = this.mode === 'unlock' ? [...instance.state.unlocked, this.asset] : instance.state.unlocked.filter((item: string) => item !== this.asset);
25 instance.setState({ unlocked });
26 });
27 }
28
29 override async didApply(): Promise<ActionApplyResult> {
30 return { advance: true };

Callers 1

revertMethod · 0.95

Calls 1

instancesMethod · 0.45

Tested by

no test coverage detected