mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Add the channel name into the current call
This commit is contained in:
parent
fafc10d57c
commit
9e99b74fce
@ -34,9 +34,9 @@ use project::{Fs, Project};
|
|||||||
use serde_derive::{Deserialize, Serialize};
|
use serde_derive::{Deserialize, Serialize};
|
||||||
use settings::SettingsStore;
|
use settings::SettingsStore;
|
||||||
use staff_mode::StaffMode;
|
use staff_mode::StaffMode;
|
||||||
use std::{mem, sync::Arc};
|
use std::{borrow::Cow, mem, sync::Arc};
|
||||||
use theme::IconButton;
|
use theme::IconButton;
|
||||||
use util::{ResultExt, TryFutureExt};
|
use util::{iife, ResultExt, TryFutureExt};
|
||||||
use workspace::{
|
use workspace::{
|
||||||
dock::{DockPosition, Panel},
|
dock::{DockPosition, Panel},
|
||||||
item::ItemHandle,
|
item::ItemHandle,
|
||||||
@ -1181,13 +1181,35 @@ impl CollabPanel {
|
|||||||
|
|
||||||
let tooltip_style = &theme.tooltip;
|
let tooltip_style = &theme.tooltip;
|
||||||
let text = match section {
|
let text = match section {
|
||||||
Section::ActiveCall => "Current Call",
|
Section::ActiveCall => {
|
||||||
Section::ContactRequests => "Requests",
|
let channel_name = iife!({
|
||||||
Section::Contacts => "Contacts",
|
let channel_id = ActiveCall::global(cx)
|
||||||
Section::Channels => "Channels",
|
.read(cx)
|
||||||
Section::ChannelInvites => "Invites",
|
.room()?
|
||||||
Section::Online => "Online",
|
.read(cx)
|
||||||
Section::Offline => "Offline",
|
.channel_id()?;
|
||||||
|
let name = self
|
||||||
|
.channel_store
|
||||||
|
.read(cx)
|
||||||
|
.channel_for_id(channel_id)?
|
||||||
|
.name
|
||||||
|
.as_str();
|
||||||
|
|
||||||
|
Some(name)
|
||||||
|
});
|
||||||
|
|
||||||
|
if let Some(name) = channel_name {
|
||||||
|
Cow::Owned(format!("Current Call - #{}", name))
|
||||||
|
} else {
|
||||||
|
Cow::Borrowed("Current Call")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Section::ContactRequests => Cow::Borrowed("Requests"),
|
||||||
|
Section::Contacts => Cow::Borrowed("Contacts"),
|
||||||
|
Section::Channels => Cow::Borrowed("Channels"),
|
||||||
|
Section::ChannelInvites => Cow::Borrowed("Invites"),
|
||||||
|
Section::Online => Cow::Borrowed("Online"),
|
||||||
|
Section::Offline => Cow::Borrowed("Offline"),
|
||||||
};
|
};
|
||||||
|
|
||||||
enum AddContact {}
|
enum AddContact {}
|
||||||
|
Loading…
Reference in New Issue
Block a user