1use anyhow::Result;
2use gpui::AppContext;
3use schemars::JsonSchema;
4use serde_derive::{Deserialize, Serialize};
5use settings::{Settings, SettingsSources};
6
7/// Configuration of voice calls in Zed.
8#[derive(Clone, Debug, Default, Deserialize, Serialize, JsonSchema)]
9#[serde(default)]
10pub struct CallSettings {
11 /// Whether the microphone should be muted when joining a channel or a call.
12 pub mute_on_join: bool,
13 /// Whether your current project should be shared when joining an empty channel.
14 pub share_on_join: bool,
15}
16
17impl Settings for CallSettings {
18 const KEY: Option<&'static str> = Some("calls");
19
20 type FileContent = Self;
21
22 fn load(sources: SettingsSources<Self::FileContent>, _: &mut AppContext) -> Result<Self> {
23 sources.json_merge()
24 }
25}