1use gpui::App;
2use settings::Settings;
3use util::MergeFrom;
4
5#[derive(Debug)]
6pub struct CallSettings {
7 pub mute_on_join: bool,
8 pub share_on_join: bool,
9}
10
11impl Settings for CallSettings {
12 fn from_defaults(content: &settings::SettingsContent, _cx: &mut App) -> Self {
13 let call = content.calls.clone().unwrap();
14 CallSettings {
15 mute_on_join: call.mute_on_join.unwrap(),
16 share_on_join: call.share_on_join.unwrap(),
17 }
18 }
19
20 fn refine(&mut self, content: &settings::SettingsContent, _cx: &mut App) {
21 if let Some(call) = content.calls.clone() {
22 self.mute_on_join.merge_from(&call.mute_on_join);
23 self.share_on_join.merge_from(&call.share_on_join);
24 }
25 }
26
27 fn import_from_vscode(
28 _vscode: &settings::VsCodeSettings,
29 _current: &mut settings::SettingsContent,
30 ) {
31 }
32}