1use anyhow::Result;
2use gpui::AppContext;
3use schemars::JsonSchema;
4use serde_derive::{Deserialize, Serialize};
5use settings::Settings;
6
7#[derive(Deserialize, Debug)]
8pub struct CallSettings {
9 pub mute_on_join: bool,
10}
11
12#[derive(Clone, Default, Serialize, Deserialize, JsonSchema, Debug)]
13pub struct CallSettingsContent {
14 pub mute_on_join: Option<bool>,
15}
16
17impl Settings for CallSettings {
18 const KEY: Option<&'static str> = Some("calls");
19
20 type FileContent = CallSettingsContent;
21
22 fn load(
23 default_value: &Self::FileContent,
24 user_values: &[&Self::FileContent],
25 _cx: &mut AppContext,
26 ) -> Result<Self>
27 where
28 Self: Sized,
29 {
30 Self::load_via_json_merge(default_value, user_values)
31 }
32}