Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix two room list regressions #4907

Merged
merged 2 commits into from Aug 29, 2017

Conversation

@t3chguy
Copy link
Collaborator

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>
@@ -78,6 +78,9 @@ var RoomSubList = React.createClass({
// 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.

This comment has been minimized.

Copy link
@lukebarnard1

lukebarnard1 Aug 29, 2017

Contributor

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.

@@ -409,6 +412,9 @@ var RoomSubList = React.createClass({
var badge;
if (subListNotifCount > 0) {
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>;

This comment has been minimized.

Copy link
@lukebarnard1

lukebarnard1 Aug 29, 2017

Contributor

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.

This comment has been minimized.

Copy link
@lukebarnard1

lukebarnard1 Aug 29, 2017

Contributor

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

This comment has been minimized.

Copy link
@t3chguy

t3chguy Aug 29, 2017

Author Collaborator

#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 Aug 29, 2017
@lukebarnard1 lukebarnard1 merged commit 2ad24a0 into develop Aug 29, 2017
1 of 2 checks passed
1 of 2 checks passed
continuous-integration/travis-ci/push The Travis CI build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@t3chguy t3chguy deleted the t3chguy/fix_two_roomlist_regressions branch Oct 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.