This makes us lose overview over new messages. Generally the initial sync is bad in my opinion.
I'm not sure I understand this bug. Can you be a bit more specific about what is seen and what is the expected behavior? (+screenshot perhaps)
Can you unpack what you mean by 'initial sync is bad' ? Ideally I'd like to avoid just saying certain parts of the code are 'bad' but rather suggest improvements or at least be specific about what the issue might be. Thanks!
During the "initial sync" we always select the most recent chat, but during the sync this can change. But as soon as we select a chat, we clear the freshmessageCounter so we actually clear some random chats during initial sync so that it's not possible anymore to see from the fresh message counter badge in which chat new messages are or the counter doesn't show the correct number anymore. Hope this makes things more clear.
How do we know if it's an "initial sync"? Can we know this?
We can know initial sync when the SplittedChatView component fires componentDidMount. Maybe we should not select any chats from the backend, and instead force the user to select a chat. If we want to automatically select the most recent chat, the frontend can send this 'select chat' event after the component mounts.
Signal does not select a chat by default when loading the app, i feel we should do the same.
opened a PR
Most helpful comment
I'm not sure I understand this bug. Can you be a bit more specific about what is seen and what is the expected behavior? (+screenshot perhaps)
Can you unpack what you mean by 'initial sync is bad' ? Ideally I'd like to avoid just saying certain parts of the code are 'bad' but rather suggest improvements or at least be specific about what the issue might be. Thanks!