diff --git a/src/components/compress/index.tsx b/src/components/compress/index.tsx index 9c49bfb3..ef5f19aa 100644 --- a/src/components/compress/index.tsx +++ b/src/components/compress/index.tsx @@ -251,12 +251,24 @@ export default class Compress extends Component { } } - private onCopyToOtherClick(index: 0 | 1) { + private async onCopyToOtherClick(index: 0 | 1) { const otherIndex = (index + 1) % 2; + const oldSettings = this.state.images[otherIndex]; this.setState({ images: cleanSet(this.state.images, otherIndex, this.state.images[index]), }); + + const result = await this.props.showSnack('Settings copied across', { + timeout: 5000, + actions: ['undo', 'dismiss'], + }); + + if (result !== 'undo') return; + + this.setState({ + images: cleanSet(this.state.images, otherIndex, oldSettings), + }); } @bind