Fix notes unread status (#7643)

1. The client-side comparison was wrong
2. The server never told the client about the version it remembered
3. The server generated broken timestamps in some cases

Release Notes:

- Fixed the notes/chat appearing as unread too often

**or**

- N/A
This commit is contained in:
Conrad Irwin 2024-02-09 23:12:26 -07:00 committed by GitHub
parent e2a3e89318
commit 68893c2ae6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 157 additions and 120 deletions

View file

@ -10,6 +10,7 @@ use channel::{ChannelBuffer, ChannelStore};
use client::{
self, proto::PeerId, Client, Connection, Credentials, EstablishConnectionError, UserStore,
};
use collab_ui::channel_view::ChannelView;
use collections::{HashMap, HashSet};
use fs::FakeFs;
use futures::{channel::oneshot, StreamExt as _};
@ -766,6 +767,16 @@ pub fn join_channel_call(cx: &mut TestAppContext) -> Task<anyhow::Result<()>> {
room.unwrap().update(cx, |room, cx| room.join_call(cx))
}
pub fn open_channel_notes(
channel_id: u64,
cx: &mut VisualTestContext,
) -> Task<anyhow::Result<View<ChannelView>>> {
let window = cx.update(|cx| cx.active_window().unwrap().downcast::<Workspace>().unwrap());
let view = window.root_view(cx).unwrap();
cx.update(|cx| ChannelView::open(channel_id, None, view.clone(), cx))
}
impl Drop for TestClient {
fn drop(&mut self) {
self.app_state.client.teardown();