Skip to content

Commit cd0888c

Browse files
author
Luke Barnard
committed
Highlight group members icon in group member info
1 parent a747a78 commit cd0888c

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
@@ -248,6 +248,11 @@ module.exports = React.createClass({
248248
}
249249
}
250250

251+
const isPhaseGroup = [
252+
this.Phase.GroupMemberInfo,
253+
this.Phase.GroupMemberList
254+
].includes(this.state.phase);
255+
251256
let headerButtons = [];
252257
if (this.props.roomId) {
253258
headerButtons = [
@@ -271,7 +276,7 @@ module.exports = React.createClass({
271276
} else if (this.props.groupId) {
272277
headerButtons = [
273278
<HeaderButton key="_groupMembersButton" title={_t('Members')} iconSrc="img/icons-people.svg"
274-
isHighlighted={this.state.phase === this.Phase.GroupMemberList}
279+
isHighlighted={isPhaseGroup}
275280
clickPhase={this.Phase.GroupMemberList}
276281
analytics={['Right Panel', 'Group Member List Button', 'click']}
277282
/>,
@@ -325,10 +330,7 @@ module.exports = React.createClass({
325330
if (this.props.groupId &&
326331
GroupStoreCache.getGroupStore(this.context.matrixClient, this.props.groupId).isUserPrivileged()
327332
) {
328-
inviteGroup = [
329-
this.Phase.GroupMemberInfo,
330-
this.Phase.GroupMemberList,
331-
].includes(this.state.phase) ? (
333+
inviteGroup = isPhaseGroup ? (
332334
<AccessibleButton className="mx_RightPanel_invite" onClick={ this.onInviteButtonClick } >
333335
<div className="mx_RightPanel_icon" >
334336
<TintableSvg src="img/icon-invite-people.svg" width="35" height="35" />

0 commit comments

Comments
 (0)