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

Show/hide apps panel and misc formatting and lint fixes

This commit is contained in:
Richard Lewis
2017-05-17 21:15:57 +01:00
parent 95988bd5ec
commit 7e1de2ac35
3 changed files with 45 additions and 28 deletions

View File

@@ -164,18 +164,16 @@ export default class MessageComposer extends React.Component {
}
onShowAppsClick(ev) {
console.warn("Showing apps");
dis.dispatch({
action: 'showApps',
room_id: this.props.room.roomId,
action: 'appsDrawer',
show: true,
});
}
onHideAppsClick(ev) {
console.warn("Hiding apps");
dis.dispatch({
action: 'hideApps',
room_id: this.props.room.roomId,
action: 'appsDrawer',
show: false,
});
}
@@ -278,7 +276,7 @@ export default class MessageComposer extends React.Component {
}
// Apps
if (this.props.showAppsState && this.props.showAppsState == 'visible') {
if (this.props.showApps) {
hideAppsButton =
<div key="controls_hide_apps" className="mx_MessageComposer_apps" onClick={this.onHideAppsClick} title="Hide Apps">
<TintableSvg src="img/icons-apps-active.svg" width="35" height="35"/>
@@ -431,5 +429,5 @@ MessageComposer.propTypes = {
opacity: React.PropTypes.number,
// string representing the current room app drawer state
showAppsState: React.PropTypes.string,
showApps: React.PropTypes.bool,
};