Skip to content

Commit a627784

Browse files
authored
Merge pull request element-hq#5432 from vector-im/luke/fix-group-members-info-icon-highlight
Highlight group members icon in group member info
2 parents 7c7ae3a + cd0888c commit a627784

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎src/components/structures/RightPanel.js‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ module.exports = React.createClass({
249249
}
250250
}
251251

252+
const isPhaseGroup = [
253+
this.Phase.GroupMemberInfo,
254+
this.Phase.GroupMemberList
255+
].includes(this.state.phase);
256+
252257
let headerButtons = [];
253258
if (this.props.roomId) {
254259
headerButtons = [
@@ -272,7 +277,7 @@ module.exports = React.createClass({
272277
} else if (this.props.groupId) {
273278
headerButtons = [
274279
<HeaderButton key="_groupMembersButton" title={_t('Members')} iconSrc="img/icons-people.svg"
275-
isHighlighted={this.state.phase === this.Phase.GroupMemberList}
280+
isHighlighted={isPhaseGroup}
276281
clickPhase={this.Phase.GroupMemberList}
277282
analytics={['Right Panel', 'Group Member List Button', 'click']}
278283
/>,
@@ -326,10 +331,7 @@ module.exports = React.createClass({
326331
if (this.props.groupId &&
327332
GroupStoreCache.getGroupStore(this.context.matrixClient, this.props.groupId).isUserPrivileged()
328333
) {
329-
inviteGroup = [
330-
this.Phase.GroupMemberInfo,
331-
this.Phase.GroupMemberList,
332-
].includes(this.state.phase) ? (
334+
inviteGroup = isPhaseGroup ? (
333335
<AccessibleButton className="mx_RightPanel_invite" onClick={ this.onInviteButtonClick } >
334336
<div className="mx_RightPanel_icon" >
335337
<TintableSvg src="img/icon-invite-people.svg" width="35" height="35" />

0 commit comments

Comments
 (0)