It's still slow, but should now work reliably

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2024-02-09 18:33:28 -07:00 committed by GitHub
parent 36b89571e9
commit 0304edd8ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 36 additions and 4 deletions

View file

@ -504,6 +504,20 @@ impl CollabPanel {
role: proto::ChannelRole::Member,
}));
}
} else if let Some(channel_id) = ActiveCall::global(cx).read(cx).pending_channel_id() {
self.entries.push(ListEntry::Header(Section::ActiveCall));
if !old_entries
.iter()
.any(|entry| matches!(entry, ListEntry::Header(Section::ActiveCall)))
{
scroll_to_top = true;
}
if query.is_empty() {
self.entries.push(ListEntry::ChannelCall { channel_id });
self.entries.push(ListEntry::ChannelNotes { channel_id });
self.entries.push(ListEntry::ChannelChat { channel_id });
}
}
let mut request_entries = Vec::new();
@ -2195,7 +2209,10 @@ impl CollabPanel {
let text = match section {
Section::ActiveCall => {
let channel_name = maybe!({
let channel_id = ActiveCall::global(cx).read(cx).channel_id(cx)?;
let channel_id = ActiveCall::global(cx)
.read(cx)
.channel_id(cx)
.or_else(|| ActiveCall::global(cx).read(cx).pending_channel_id())?;
let channel = self.channel_store.read(cx).channel_for_id(channel_id)?;