-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add unread highlighting mentions in the RoomPreview when a user menti… #349
Add unread highlighting mentions in the RoomPreview when a user menti… #349
Conversation
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.
Thanks, looks great! I just left a few tiny nitpicks.
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.
Oops, i forgot to check the code closely the first time. Sorry, I was distracted.
It seems like the key part of the logic is missing -- you're not actually displaying the number of unread mentions. You're only changing the color.
The logic should be:
- if num_unread_mentions > 0, make the badge color red and display the number of unread mentions.
- else if num_unread_messages > 0, make the badge gray and display the number of unread messages
- else hide the badge.
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.
Awesome, thanks!
When the unread messages change, the num_unread_mentions value is also passed. If this value is greater than 0, the badge is displayed in red; otherwise, it is shown in gray.
issue: #329