Skip to content

Commit

Permalink
Merge pull request #5657 from vector-im/luke/fix-member-count-format
Browse files Browse the repository at this point in the history
Use badge count format for member count in RightPanel
  • Loading branch information
lukebarnard1 authored Nov 20, 2017
2 parents 21d7c4d + 7cb59bd commit f2e6659
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/structures/RightPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import AccessibleButton from 'matrix-react-sdk/lib/components/views/elements/Acc
import { showGroupInviteDialog, showGroupAddRoomDialog } from 'matrix-react-sdk/lib/GroupAddressPicker';
import GroupStoreCache from 'matrix-react-sdk/lib/stores/GroupStoreCache';

import { formatCount } from 'matrix-react-sdk/lib/utils/FormattingUtils';

class HeaderButton extends React.Component {
constructor() {
super();
Expand Down Expand Up @@ -264,7 +266,7 @@ module.exports = React.createClass({
const room = cli.getRoom(this.props.roomId);
let userIsInRoom;
if (room) {
membersBadge = room.getJoinedMembers().length;
membersBadge = formatCount(room.getJoinedMembers().length);
userIsInRoom = room.hasMembershipState(
this.context.matrixClient.credentials.userId, 'join',
);
Expand Down

0 comments on commit f2e6659

Please sign in to comment.