Minimize stickerpicker when the title is clicked

Fixes https://github.com/vector-im/riot-web/issues/6437

This also fixes a bug where if the room had apps open and you clicked the sticker picker's title, you'd end up closing the apps and not the picker.
This commit is contained in:
Travis Ralston 2019-03-23 23:50:06 -06:00
parent 7b972e476f
commit a8ae63bb06
2 changed files with 10 additions and 5 deletions

View file

@ -447,11 +447,15 @@ export default class AppTile extends React.Component {
} }
// Toggle the view state of the apps drawer // Toggle the view state of the apps drawer
if (this.props.userWidget) {
this._onMinimiseClick();
} else {
dis.dispatch({ dis.dispatch({
action: 'appsDrawer', action: 'appsDrawer',
show: !this.props.show, show: !this.props.show,
}); });
} }
}
_getSafeUrl() { _getSafeUrl() {
const parsedWidgetUrl = url.parse(this.state.widgetUrl, true); const parsedWidgetUrl = url.parse(this.state.widgetUrl, true);
@ -626,7 +630,7 @@ export default class AppTile extends React.Component {
{ /* Maximise widget */ } { /* Maximise widget */ }
{ showMaximiseButton && <AccessibleButton { showMaximiseButton && <AccessibleButton
className="mx_AppTileMenuBar_iconButton mx_AppTileMenuBar_iconButton_maximise" className="mx_AppTileMenuBar_iconButton mx_AppTileMenuBar_iconButton_maximise"
title={_t('Minimize apps')} title={_t('Maximize apps')}
onClick={this._onMinimiseClick} onClick={this._onMinimiseClick}
/> } /> }
{ /* Title */ } { /* Title */ }

View file

@ -935,6 +935,7 @@
"Failed to remove widget": "Failed to remove widget", "Failed to remove widget": "Failed to remove widget",
"An error ocurred whilst trying to remove the widget from the room": "An error ocurred whilst trying to remove the widget from the room", "An error ocurred whilst trying to remove the widget from the room": "An error ocurred whilst trying to remove the widget from the room",
"Minimize apps": "Minimize apps", "Minimize apps": "Minimize apps",
"Maximize apps": "Maximize apps",
"Reload widget": "Reload widget", "Reload widget": "Reload widget",
"Popout widget": "Popout widget", "Popout widget": "Popout widget",
"Picture": "Picture", "Picture": "Picture",