Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix favicon/title badge count #3121

Merged
merged 2 commits into from
Jun 19, 2019
Merged

Fix favicon/title badge count #3121

merged 2 commits into from
Jun 19, 2019

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Jun 19, 2019

This was using a separate function (in MatrixChat) that didn't
take into account whether we were supposed to be hiding the badge
for rooms so would include notifs that were hidden everywhere else.

Also make it a function & put it in RoomNotifs with all its friends.

Fixes element-hq/element-web#3060

This was using a separate function (in MatrixChat) that didn't
take into account whether we were supposed to be hiding the badge
for rooms so would include notifs that were hidden everywhere else.

Also make it a function & put it in RoomNotifs with all its friends.

Fixes element-hq/element-web#3060
@dbkr dbkr requested a review from a team June 19, 2019 11:08
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me! 😁

const highlight = room.getUnreadNotificationCount('highlight') > 0;
const notificationCount = room.getUnreadNotificationCount();

const notifBadges = notificationCount > 0 && _shouldShowNotifBadge(roomNotifState);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess this will conflict with your other PR, which I think removed the _.

if (badges) {
result.count++;
if (highlight) {
result.highlight = true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are you computing highlight for some future consumer? It's not used below...

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I figured it just ought to be consistent with the other function below.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Favicon notification count not reflected in highlighted rooms (stuck badge count)
2 participants