Improve zeroing of RoomList notification badges
Use an action and force an update when zeroing the number of notifications in a room. This is better than waiting for a `render` to happen at some point. This will hopefully fix https://github.com/vector-im/riot-web/issues/3257
This commit is contained in:
parent
aa486b605d
commit
f4dc7ae8b1
2 changed files with 10 additions and 3 deletions
|
@ -96,6 +96,12 @@ module.exports = React.createClass({
|
|||
});
|
||||
}
|
||||
break;
|
||||
case 'on_room_read':
|
||||
payload.room.setUnreadNotificationCount('total', 0);
|
||||
payload.room.setUnreadNotificationCount('highlight', 0);
|
||||
// Force an update because this state is too deep to cause an update
|
||||
this.forceUpdate();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue