fix: Hide rich editor for unsupported channels (#2102)

* Fix: Hide rich editor for unsupported channels

* Review fixes

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Nithin David Thomas 2021-04-16 19:03:46 +05:30 committed by GitHub
parent 98bfef026e
commit c287ad08fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,10 +127,18 @@ export default {
},
computed: {
showRichContentEditor() {
const {
display_rich_content_editor: displayRichContentEditor,
} = this.uiSettings;
return this.isOnPrivateNote || displayRichContentEditor;
if (this.isOnPrivateNote) {
return true;
}
if (this.isRichEditorEnabled) {
const {
display_rich_content_editor: displayRichContentEditor,
} = this.uiSettings;
return displayRichContentEditor;
}
return false;
},
...mapGetters({ currentChat: 'getSelectedChat' }),
enterToSendEnabled() {
@ -219,9 +227,7 @@ export default {
return this.attachedFiles.length;
},
isRichEditorEnabled() {
return (
this.isAWebWidgetInbox || this.isAnEmailChannel || this.isOnPrivateNote
);
return this.isAWebWidgetInbox || this.isAnEmailChannel;
},
isOnPrivateNote() {
return this.replyType === REPLY_EDITOR_MODES.NOTE;