1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-20 16:22:28 +03:00

When panels are shown/hidden, hide sticker picker

This commit is contained in:
Luke Barnard
2018-05-14 16:35:12 +01:00
parent dddd1c43cc
commit 3761cd4054

View File

@@ -127,10 +127,19 @@ export default class Stickerpicker extends React.Component {
} }
_onWidgetAction(payload) { _onWidgetAction(payload) {
if (payload.action === "user_widget_updated") { switch (payload.action) {
this.forceUpdate(); case "user_widget_updated":
} else if (payload.action === "stickerpicker_close") { this.forceUpdate();
this.setState({showStickers: false}); break;
case "stickerpicker_close":
this.setState({showStickers: false});
break;
case "show_right_panel":
case "hide_right_panel":
case "show_left_panel":
case "hide_left_panel":
this.setState({showStickers: false});
break;
} }
} }