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

Commit

Permalink
rename noPopout to: noPopoutButton (more explicit)
Browse files Browse the repository at this point in the history
  • Loading branch information
toger5 committed Oct 25, 2021
1 parent 7243e34 commit 14b191d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ export default class WidgetCapabilitiesPromptDialog extends React.PureComponent<

return 0;
});
// const filteredCapabilites = //TODO this would be where the NoPopout capability text can be hidden and approved by default
const checkboxRows = orderedCapabilities.map(([cap, isChecked], i) => {
const text = CapabilityText.for(cap, this.props.widgetKind);
const byline = text.byline
Expand Down
8 changes: 4 additions & 4 deletions src/components/views/elements/AppTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ interface IState {
error: Error;
menuDisplayed: boolean;
widgetPageTitle: string;
noPopout: boolean;
noPopoutButton: boolean;
}

import { logger } from "matrix-js-sdk/src/logger";
Expand Down Expand Up @@ -156,7 +156,7 @@ export default class AppTile extends React.Component<IProps, IState> {
error: null,
menuDisplayed: false,
widgetPageTitle: this.props.widgetPageTitle,
noPopout: true,
noPopoutButton: true,
};
}

Expand Down Expand Up @@ -298,7 +298,7 @@ export default class AppTile extends React.Component<IProps, IState> {
this.sgWidget.widgetApi.transport.send(ElementWidgetActions.ClientReady, {});
}
this.setState({
noPopout: this.sgWidget.widgetApi.hasCapability(MatrixCapabilities.RequiresClient)
noPopoutButton: this.sgWidget.widgetApi.hasCapability(MatrixCapabilities.RequiresClient)
});
};

Expand Down Expand Up @@ -517,7 +517,7 @@ export default class AppTile extends React.Component<IProps, IState> {
{ this.props.showTitle && this.getTileTitle() }
</span>
<span className="mx_AppTileMenuBarWidgets">
{(this.props.showPopout && !this.state.noPopout) && <AccessibleButton
{(this.props.showPopout && !this.state.noPopoutButton) && <AccessibleButton
className="mx_AppTileMenuBar_iconButton mx_AppTileMenuBar_iconButton_popout"
title={_t('Popout widget')}
onClick={this.onPopoutWidgetClick}
Expand Down

0 comments on commit 14b191d

Please sign in to comment.