Hide sticker picker for local rooms (#9174)
* Disable stickers for local rooms * Use prop
This commit is contained in:
parent
ed4286aa93
commit
964d538db9
2 changed files with 52 additions and 29 deletions
|
@ -51,6 +51,7 @@ import { SettingUpdatedPayload } from "../../../dispatcher/payloads/SettingUpdat
|
|||
import MessageComposerButtons from './MessageComposerButtons';
|
||||
import { ButtonEvent } from '../elements/AccessibleButton';
|
||||
import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload";
|
||||
import { isLocalRoom } from '../../../utils/localRoom/isLocalRoom';
|
||||
|
||||
let instanceCount = 0;
|
||||
|
||||
|
@ -350,6 +351,10 @@ export default class MessageComposer extends React.Component<IProps, IState> {
|
|||
});
|
||||
};
|
||||
|
||||
private get showStickersButton(): boolean {
|
||||
return this.state.showStickersButton && !isLocalRoom(this.props.room);
|
||||
}
|
||||
|
||||
public render() {
|
||||
const controls = [
|
||||
this.props.e2eStatus ?
|
||||
|
@ -475,7 +480,7 @@ export default class MessageComposer extends React.Component<IProps, IState> {
|
|||
setStickerPickerOpen={this.setStickerPickerOpen}
|
||||
showLocationButton={!window.electron}
|
||||
showPollsButton={this.state.showPollsButton}
|
||||
showStickersButton={this.state.showStickersButton}
|
||||
showStickersButton={this.showStickersButton}
|
||||
toggleButtonMenu={this.toggleButtonMenu}
|
||||
/> }
|
||||
{ showSendButton && (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue