Skip to content

fix two room list regressions#4907

Merged
lukebarnard1 merged 2 commits intodevelopfrom
t3chguy/fix_two_roomlist_regressions
Aug 29, 2017
Merged

fix two room list regressions#4907
lukebarnard1 merged 2 commits intodevelopfrom
t3chguy/fix_two_roomlist_regressions

Conversation

@t3chguy
Copy link
Copy Markdown
Member

@t3chguy t3chguy commented Aug 27, 2017

  • missing roomsublist badge for invites
  • missing room badge for invites if i18n!=English

Requires matrix-org/matrix-react-sdk#1343

Signed-off-by: Michael Telatynski 7t3chguy@gmail.com

+ missing roomsublist badge for invites
+ missing room badge for invites if i18n!=English

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
// undefined if no room is selected (eg we are showing settings)
selectedRoom: React.PropTypes.string,

// pass explicitly, do not rely on label==='Invites' because i18n.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of context, this comment doesn't mean much. Maybe just mention that it's passed through to RoomTile and makes the header highlighted regardless of notifications.

badge = <div className={badgeClasses}>{ FormattingUtils.formatCount(subListNotifCount) }</div>;
} else if (this.props.isInvite) {
// no notifications but highlight anyway because this is an invite badge
badge = <div className={badgeClasses}>!</div>;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps show the number of invites, i.e. the number of items in the sublist. I'd suggest just using the if, passing a generic count to .formatCount above, and then deciding whether to set count to subListNotifCount or roomCount based on isInvite.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind, the "!" is by design and the number of invites is already displayed in the sublist header.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#3707 (comment) for history sake

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
@t3chguy t3chguy force-pushed the t3chguy/fix_two_roomlist_regressions branch from 49dee4d to f560dc4 Compare August 29, 2017 13:59
@t3chguy
Copy link
Copy Markdown
Member Author

t3chguy commented Aug 29, 2017

@lukebarnard1 lukebarnard1 merged commit 2ad24a0 into develop Aug 29, 2017
@t3chguy t3chguy deleted the t3chguy/fix_two_roomlist_regressions branch October 29, 2017 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants