Fix channel messages test

This commit is contained in:
Mikayla 2023-10-04 10:13:02 -07:00
parent db8096ccdc
commit e548572f12
No known key found for this signature in database
5 changed files with 78 additions and 20 deletions

View file

@ -273,7 +273,19 @@ impl ChatPanel {
new_count,
} => {
self.message_list.splice(old_range.clone(), *new_count);
self.acknowledge_last_message(cx);
if self.active {
self.acknowledge_last_message(cx);
}
}
ChannelChatEvent::NewMessage {
channel_id,
message_id,
} => {
if !self.active {
self.channel_store.update(cx, |store, cx| {
store.new_message(*channel_id, *message_id, cx)
})
}
}
}
cx.notify();