-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
+ missing roomsublist badge for invites + missing room badge for invites if i18n!=English Signed-off-by: Michael Telatynski <[email protected]>
@@ -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. |
There was a problem hiding this comment.
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.
@@ -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>; |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 <[email protected]>
49dee4d
to
f560dc4
Compare
Requires matrix-org/matrix-react-sdk#1343
Signed-off-by: Michael Telatynski [email protected]