Received messages in selected chat are dropped when different screen is selected in the Sidebar
To reproduce:
- start two instances B1 and B2 of Briar and wait for them to connect
- in B1, select the chat with B2, then go to Settings
- in B2, select the chat with B1 and send a message
- notice that the taskbar icon of B1 changes (the message is received)
- in B1, go back to private messages
- notice that the chat is still selected and the contact shows one unread message in the contact list, but no message is visible
- select a different contact and then again the chat with B2
- notice that the message is now visible
This has most probably to do with our mechanism of stopping listening to events in the corresponding viewModel as soon as the Composable is out of scope: The ConversationViewModel does not get informed about the new message, but no message reload is triggered since the same chat is still selected when coming back from the settings.