leapchat
leapchat copied to clipboard
Set Favicon for app
Generate .co (or whatever optimal file is) at best size and set as favicon.
Would be cool to have it include the number of new messages, or the number of times you've been mentioned (near this code).
...or any other indication of new messages, really. Again I really like how Slack does it: favicon appears highlighted when there's activity, but is way more prominent if you've been mentioned or have received a private message.
Is there an existing mechanism for tracking which messages are read / unread? Probably something we can offload to client-side storage, though that wouldn't persist between devices.
@jimmcgaw Not really but kind of? https://github.com/cryptag/leapchat/blob/82e23f3ea3196d13af7c4e3632e64f9542fd5283/src/components/chat/MessageBox.js#L37
Oh I see what you mean. No there isn't but if for now we consider a message to have been "read" if it was received during any point when the user's status is viewing
, that should be plenty good
In componentDidUpdate
we can say (in code): "if state.status
just switched from non-'viewing' to 'viewing', mark all messages in state.messages
as read". How's that sound for now?
(Later we can do the same thing but also have the client send to the server the ID of the most recent message it has seen, once users have accounts.)
Status: asked my friend Zen if he can make a LeapChat logo. If he doesn't get back to me soon, I'll ask someone else.
(We could use that logo, or some part of it, or something derived from it, for the favicon.)