Since there's no lastRead property in localStorage, it shows every conversation as completely unread. Instead, it should show them all as "read" until a new message comes in.
Ideas:
If lastRead property doesn't exist in localStorage, set every conversation's lastRead to the current timestamp (but the subscription doesn't know about all the conversations)
Set a new property in state called firstRead and have the view also compare to that timestamp. It would only be set on the first visit to the page.
Since there's no
lastRead
property in localStorage, it shows every conversation as completely unread. Instead, it should show them all as "read" until a new message comes in.Ideas:
lastRead
property doesn't exist in localStorage, set every conversation'slastRead
to the current timestamp (but the subscription doesn't know about all the conversations)firstRead
and have the view also compare to that timestamp. It would only be set on the first visit to the page.