浏览代码

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
 // @flow
1
 // @flow
2
 
2
 
3
+import { CHAT_ENABLED, getFeatureFlag } from '../../base/flags';
3
 import { translate } from '../../base/i18n';
4
 import { translate } from '../../base/i18n';
4
 import { IconMessage, IconReply } from '../../base/icons';
5
 import { IconMessage, IconReply } from '../../base/icons';
5
 import { getParticipantById } from '../../base/participants';
6
 import { getParticipantById } from '../../base/participants';
77
  * @returns {Props}
78
  * @returns {Props}
78
  */
79
  */
79
 export function _mapStateToProps(state: Object, ownProps: Props): $Shape<Props> {
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
     return {
84
     return {
81
-        _participant: getParticipantById(state, ownProps.participantID)
85
+        _participant: getParticipantById(state, ownProps.participantID),
86
+        visible
82
     };
87
     };
83
 }
88
 }
84
 
89
 

正在加载...
取消
保存