diff --git a/lib/static/components/controls/common-controls.jsx b/lib/static/components/controls/common-controls.jsx index e2137f16f..5981d459b 100644 --- a/lib/static/components/controls/common-controls.jsx +++ b/lib/static/components/controls/common-controls.jsx @@ -75,7 +75,7 @@ class ControlButtons extends Component { size='m' label="Diff mode" value={view.diffMode} - handler={actions.changeDiffMode} + handler={diffModeId => actions.setDiffMode({diffModeId})} options = {Object.values(DiffModes).map((dm) => { return {value: dm.id, content: dm.title}; })} diff --git a/lib/static/components/modals/screenshot-accepter/header.jsx b/lib/static/components/modals/screenshot-accepter/header.jsx index 7971df775..68873a2d9 100644 --- a/lib/static/components/modals/screenshot-accepter/header.jsx +++ b/lib/static/components/modals/screenshot-accepter/header.jsx @@ -193,7 +193,7 @@ export default class ScreenshotAccepterHeader extends Component { size="m" label="Diff mode" value={view.diffMode} - handler={actions.changeDiffMode} + handler={diffModeId => actions.setDiffMode({diffModeId})} options = {Object.values(DiffModes).map((dm) => { return {value: dm.id, content: dm.title}; })} diff --git a/test/unit/lib/static/components/modals/screenshot-accepter/header.jsx b/test/unit/lib/static/components/modals/screenshot-accepter/header.jsx index c3475f74a..2dcc088e7 100644 --- a/test/unit/lib/static/components/modals/screenshot-accepter/header.jsx +++ b/test/unit/lib/static/components/modals/screenshot-accepter/header.jsx @@ -18,7 +18,7 @@ describe('', () => { const DEFAULT_PROPS = { view: {diffMode: DiffModes.THREE_UP_SCALED}, - actions: {changeDiffMode: sinon.stub().returns({type: 'some-type'})}, + actions: {setDiffMode: sinon.stub().returns({type: 'some-type'})}, totalImages: 2, acceptedImages: 0, images: [{