Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1854 from matrix-org/rxl881/stickerPopout
Browse files Browse the repository at this point in the history
Optionally hide widget popout button.
  • Loading branch information
rxl881 authored Apr 25, 2018
2 parents 81488b2 + b2d6dd8 commit 1fa6f63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/views/elements/AppTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -609,14 +609,14 @@ export default class AppTile extends React.Component {
</span>
<span className="mx_AppTileMenuBarWidgets">
{ /* Popout widget */ }
<TintableSvgButton
{ this.props.showPopout && <TintableSvgButton
src={popoutWidgetIcon}
className="mx_AppTileMenuBarWidget mx_AppTileMenuBarWidgetPadding"
title={_t('Popout widget')}
onClick={this._onPopoutWidgetClick}
width="10"
height="10"
/>
/> }

{ /* Snapshot widget */ }
{ showPictureSnapshotButton && <TintableSvgButton
Expand Down Expand Up @@ -689,6 +689,8 @@ AppTile.propTypes = {
handleMinimisePointerEvents: PropTypes.bool,
// Optionally hide the delete icon
showDelete: PropTypes.bool,
// Optionally hide the popout widget icon
showPopout: PropTypes.bool,
// Widget apabilities to allow by default (without user confirmation)
// NOTE -- Use with caution. This is intended to aid better integration / UX
// basic widget capabilities, e.g. injecting sticker message events.
Expand All @@ -705,6 +707,7 @@ AppTile.defaultProps = {
showTitle: true,
showMinimise: true,
showDelete: true,
showPopout: true,
handleMinimisePointerEvents: false,
whitelistCapabilities: [],
};
1 change: 1 addition & 0 deletions src/components/views/rooms/Stickerpicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ export default class Stickerpicker extends React.Component {
showTitle={false}
showMinimise={true}
showDelete={false}
showPopout={false}
onMinimiseClick={this._onHideStickersClick}
handleMinimisePointerEvents={true}
whitelistCapabilities={['m.sticker']}
Expand Down

0 comments on commit 1fa6f63

Please sign in to comment.