浏览代码

fix(chat) hides send private chat button when enable.chat flag is false.

j8
titus.moldovan 4 年前
父节点
当前提交
2587eefefc
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6
    1
      react/features/chat/components/PrivateMessageButton.js

+ 6
- 1
react/features/chat/components/PrivateMessageButton.js 查看文件

@@ -1,5 +1,6 @@
1 1
 // @flow
2 2
 
3
+import { CHAT_ENABLED, getFeatureFlag } from '../../base/flags';
3 4
 import { translate } from '../../base/i18n';
4 5
 import { IconMessage, IconReply } from '../../base/icons';
5 6
 import { getParticipantById } from '../../base/participants';
@@ -77,8 +78,12 @@ class PrivateMessageButton extends AbstractButton<Props, any> {
77 78
  * @returns {Props}
78 79
  */
79 80
 export function _mapStateToProps(state: Object, ownProps: Props): $Shape<Props> {
81
+    const enabled = getFeatureFlag(state, CHAT_ENABLED, true);
82
+    const { visible = enabled } = ownProps;
83
+
80 84
     return {
81
-        _participant: getParticipantById(state, ownProps.participantID)
85
+        _participant: getParticipantById(state, ownProps.participantID),
86
+        visible
82 87
     };
83 88
 }
84 89
 

正在加载...
取消
保存