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

Set room highlight from unread_notification_count #68

Merged
merged 8 commits into from
Jan 21, 2016
Merged

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Dec 22, 2015

@@ -163,6 +157,11 @@ module.exports = React.createClass({
this.setState(newState);
},

onRoomReceipt: function(receiptEvent, room) {
// because if we read a notification, it will affect notification count
this.refreshRoomList();
Copy link
Member

Choose a reason for hiding this comment

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

We should check if it is the user's receipt and not someone else then in order to prevent refreshing the room list for every receipt.

@kegsay
Copy link
Member

kegsay commented Dec 23, 2015

LGTM other than comments.

@kegsay kegsay assigned dbkr and unassigned kegsay Jan 5, 2016
@dbkr
Copy link
Member Author

dbkr commented Jan 7, 2016

Comments addressed

@kegsay
Copy link
Member

kegsay commented Jan 7, 2016

LGTM

@dbkr
Copy link
Member Author

dbkr commented Jan 15, 2016

Fixes element-hq/element-web#292

@dbkr dbkr closed this Jan 15, 2016
@dbkr dbkr reopened this Jan 15, 2016
@dbkr
Copy link
Member Author

dbkr commented Jan 21, 2016

This has changed slightly so quick ptal?

@dbkr dbkr assigned kegsay and unassigned dbkr Jan 21, 2016
if (rooms[i].hasMembershipState(MatrixClientPeg.get().credentials.userId, 'invite')) {
++notifCount;
} else if (rooms[i].unread_notifications && rooms[i].unread_notifications['notification_count']) {
notifCount += rooms[i].unread_notifications['notification_count'];
Copy link
Member

Choose a reason for hiding this comment

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

I thought we had getters now for this?

@kegsay
Copy link
Member

kegsay commented Jan 21, 2016

LGTM aside from comment

@dbkr
Copy link
Member Author

dbkr commented Jan 21, 2016

ahem apply patch the right branch...

@kegsay
Copy link
Member

kegsay commented Jan 21, 2016

LGTM :)

dbkr added a commit that referenced this pull request Jan 21, 2016
Set room highlight from unread_notification_count
@dbkr dbkr merged commit 99a491b into develop Jan 21, 2016
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.

2 participants