...
/Displaying Unread Notifications
Displaying Unread Notifications
Let's display how many unread messages are waiting in each room in the form of notifications.
We'll cover the following...
Time to add a final flourish: let’s display how many unread messages are waiting in each room.
Notifications
While not strictly needed for a chat room, it can be interesting to see how many new messages have shown up in a room that the user doesn’t have directly loaded.
Annotating streams
This feature is concerned with two streams: new messages and room loads.
The tricky part is that, while we want to listen in to multiple streams and store the state inside the observable stream (using merge
and scan
...