Add call2

Co-Authored-By: Kirill Bulatov <kirill@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
Antonio Scandurra 2023-10-26 11:56:34 +02:00
parent 483ac9491a
commit 3bcae6d7de
9 changed files with 67 additions and 45 deletions

View file

@ -1,6 +1,8 @@
use anyhow::Result;
use gpui2::AppContext;
use schemars::JsonSchema;
use serde_derive::{Deserialize, Serialize};
use settings2::Setting;
use settings2::Settings;
#[derive(Deserialize, Debug)]
pub struct CallSettings {
@ -12,7 +14,7 @@ pub struct CallSettingsContent {
pub mute_on_join: Option<bool>,
}
impl Setting for CallSettings {
impl Settings for CallSettings {
const KEY: Option<&'static str> = Some("calls");
type FileContent = CallSettingsContent;
@ -20,8 +22,11 @@ impl Setting for CallSettings {
fn load(
default_value: &Self::FileContent,
user_values: &[&Self::FileContent],
_: &gpui2::AppContext,
) -> anyhow::Result<Self> {
_cx: &mut AppContext,
) -> Result<Self>
where
Self: Sized,
{
Self::load_via_json_merge(default_value, user_values)
}
}