feat(calls): Hide meeting timer
- View menu switch "Hide meeting timer" (Teams string), hides the elapsed time in the call header and the mini windows - kept on the device like the other view choices (Teams keeps meetingTimerViewState locally, not on the account) - deviation / open check: where Teams places the option was not verified (calling bundle not in the saved copy); ours sits in the View menu next to "Hide me" Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@@ -3,6 +3,7 @@ use super::caption_style::{CaptionPosition, CaptionSize};
3
3
const LAYOUT_META_KEY: &str = "call_layout";
4
4
const HIDE_NO_VIDEO_META_KEY: &str = "call_hide_no_video";
5
5
const CHAT_BUBBLES_META_KEY: &str = "call_chat_bubbles";
6
const HIDE_TIMER_META_KEY: &str = "call_hide_timer";
6
7
const CAPTION_SIZE_META_KEY: &str = "call_caption_size";
7
8
const CAPTION_POSITION_META_KEY: &str = "call_caption_position";
8
9
@@ -47,6 +48,7 @@ pub struct ViewSettings {
47
48
pub hide_no_video: bool,
48
49
pub chat_bubbles: bool,
49
50
pub hide_me: bool,
51
pub hide_timer: bool,
50
52
pub caption_size: CaptionSize,
51
53
pub caption_position: CaptionPosition,
52
54
}
@@ -59,6 +61,7 @@ impl Default for ViewSettings {
59
61
hide_no_video: false,
60
62
chat_bubbles: true,
61
63
hide_me: false,
64
hide_timer: false,
62
65
caption_size: CaptionSize::Medium,
63
66
caption_position: CaptionPosition::Bottom,
64
67
}
@@ -81,6 +84,7 @@ impl ViewSettings {
81
84
layout,
82
85
hide_no_video: flag(HIDE_NO_VIDEO_META_KEY, false),
83
86
chat_bubbles: flag(CHAT_BUBBLES_META_KEY, true),
87
hide_timer: flag(HIDE_TIMER_META_KEY, false),
84
88
caption_size: store
85
89
.meta(CAPTION_SIZE_META_KEY)
86
90
.ok()
@@ -105,6 +109,10 @@ impl ViewSettings {
105
109
CHAT_BUBBLES_META_KEY,
106
110
if self.chat_bubbles { "1" } else { "0" },
107
111
);
112
let _ = store.set_meta(
113
HIDE_TIMER_META_KEY,
114
if self.hide_timer { "1" } else { "0" },
115
);
108
116
let _ = store.set_meta(CAPTION_SIZE_META_KEY, self.caption_size.meta());
109
117
let _ = store.set_meta(CAPTION_POSITION_META_KEY, self.caption_position.meta());
110
118
}
@@ -129,6 +137,7 @@ mod tests {
129
137
assert!(settings.chat_bubbles);
130
138
assert!(!settings.hide_no_video);
131
139
assert!(!settings.hide_me);
140
assert!(!settings.hide_timer);
132
141
assert_eq!(settings.caption_size, CaptionSize::Medium);
133
142
assert_eq!(settings.caption_position, CaptionPosition::Bottom);
134
143
}
@@ -141,6 +150,7 @@ mod tests {
141
150
settings.hide_no_video = true;
142
151
settings.chat_bubbles = false;
143
152
settings.hide_me = true;
153
settings.hide_timer = true;
144
154
settings.caption_size = CaptionSize::Large;
145
155
settings.caption_position = CaptionPosition::Top;
146
156
settings.save(&store);
@@ -149,6 +159,7 @@ mod tests {
149
159
assert!(loaded.hide_no_video);
150
160
assert!(!loaded.chat_bubbles);
151
161
assert!(!loaded.hide_me);
162
assert!(loaded.hide_timer);
152
163
assert_eq!(loaded.caption_size, CaptionSize::Large);
153
164
assert_eq!(loaded.caption_position, CaptionPosition::Top);
154
165
}
@@ -3,6 +3,7 @@ use super::caption_style::{CaptionPosition, CaptionSize};3
const LAYOUT_META_KEY: &str = "call_layout";3
const LAYOUT_META_KEY: &str = "call_layout";4
const HIDE_NO_VIDEO_META_KEY: &str = "call_hide_no_video";4
const HIDE_NO_VIDEO_META_KEY: &str = "call_hide_no_video";5
const CHAT_BUBBLES_META_KEY: &str = "call_chat_bubbles";5
const CHAT_BUBBLES_META_KEY: &str = "call_chat_bubbles";6
const HIDE_TIMER_META_KEY: &str = "call_hide_timer";6
const CAPTION_SIZE_META_KEY: &str = "call_caption_size";7
const CAPTION_SIZE_META_KEY: &str = "call_caption_size";7
const CAPTION_POSITION_META_KEY: &str = "call_caption_position";8
const CAPTION_POSITION_META_KEY: &str = "call_caption_position";8
9
@@ -47,6 +48,7 @@ pub struct ViewSettings {47
pub hide_no_video: bool,48
pub hide_no_video: bool,48
pub chat_bubbles: bool,49
pub chat_bubbles: bool,49
pub hide_me: bool,50
pub hide_me: bool,51
pub hide_timer: bool,50
pub caption_size: CaptionSize,52
pub caption_size: CaptionSize,51
pub caption_position: CaptionPosition,53
pub caption_position: CaptionPosition,52
}54
}@@ -59,6 +61,7 @@ impl Default for ViewSettings {59
hide_no_video: false,61
hide_no_video: false,60
chat_bubbles: true,62
chat_bubbles: true,61
hide_me: false,63
hide_me: false,64
hide_timer: false,62
caption_size: CaptionSize::Medium,65
caption_size: CaptionSize::Medium,63
caption_position: CaptionPosition::Bottom,66
caption_position: CaptionPosition::Bottom,64
}67
}@@ -81,6 +84,7 @@ impl ViewSettings {81
layout,84
layout,82
hide_no_video: flag(HIDE_NO_VIDEO_META_KEY, false),85
hide_no_video: flag(HIDE_NO_VIDEO_META_KEY, false),83
chat_bubbles: flag(CHAT_BUBBLES_META_KEY, true),86
chat_bubbles: flag(CHAT_BUBBLES_META_KEY, true),87
hide_timer: flag(HIDE_TIMER_META_KEY, false),84
caption_size: store88
caption_size: store85
.meta(CAPTION_SIZE_META_KEY)89
.meta(CAPTION_SIZE_META_KEY)86
.ok()90
.ok()@@ -105,6 +109,10 @@ impl ViewSettings {105
CHAT_BUBBLES_META_KEY,109
CHAT_BUBBLES_META_KEY,106
if self.chat_bubbles { "1" } else { "0" },110
if self.chat_bubbles { "1" } else { "0" },107
);111
);112
let _ = store.set_meta(113
HIDE_TIMER_META_KEY,114
if self.hide_timer { "1" } else { "0" },115
);108
let _ = store.set_meta(CAPTION_SIZE_META_KEY, self.caption_size.meta());116
let _ = store.set_meta(CAPTION_SIZE_META_KEY, self.caption_size.meta());109
let _ = store.set_meta(CAPTION_POSITION_META_KEY, self.caption_position.meta());117
let _ = store.set_meta(CAPTION_POSITION_META_KEY, self.caption_position.meta());110
}118
}@@ -129,6 +137,7 @@ mod tests {129
assert!(settings.chat_bubbles);137
assert!(settings.chat_bubbles);130
assert!(!settings.hide_no_video);138
assert!(!settings.hide_no_video);131
assert!(!settings.hide_me);139
assert!(!settings.hide_me);140
assert!(!settings.hide_timer);132
assert_eq!(settings.caption_size, CaptionSize::Medium);141
assert_eq!(settings.caption_size, CaptionSize::Medium);133
assert_eq!(settings.caption_position, CaptionPosition::Bottom);142
assert_eq!(settings.caption_position, CaptionPosition::Bottom);134
}143
}@@ -141,6 +150,7 @@ mod tests {141
settings.hide_no_video = true;150
settings.hide_no_video = true;142
settings.chat_bubbles = false;151
settings.chat_bubbles = false;143
settings.hide_me = true;152
settings.hide_me = true;153
settings.hide_timer = true;144
settings.caption_size = CaptionSize::Large;154
settings.caption_size = CaptionSize::Large;145
settings.caption_position = CaptionPosition::Top;155
settings.caption_position = CaptionPosition::Top;146
settings.save(&store);156
settings.save(&store);@@ -149,6 +159,7 @@ mod tests {149
assert!(loaded.hide_no_video);159
assert!(loaded.hide_no_video);150
assert!(!loaded.chat_bubbles);160
assert!(!loaded.chat_bubbles);151
assert!(!loaded.hide_me);161
assert!(!loaded.hide_me);162
assert!(loaded.hide_timer);152
assert_eq!(loaded.caption_size, CaptionSize::Large);163
assert_eq!(loaded.caption_size, CaptionSize::Large);153
assert_eq!(loaded.caption_position, CaptionPosition::Top);164
assert_eq!(loaded.caption_position, CaptionPosition::Top);154
}165
}@@ -58,6 +58,10 @@ impl AppState {
58
58
self.change_call_view(|view| view.chat_bubbles = !view.chat_bubbles, cx);
59
59
}
60
60
61
pub fn toggle_call_hide_timer(&mut self, cx: &mut Context<Self>) {
62
self.change_call_view(|view| view.hide_timer = !view.hide_timer, cx);
63
}
64
61
65
pub fn set_call_hide_me(&mut self, hidden: bool, cx: &mut Context<Self>) {
62
66
if let Some(call) = self.call.as_mut() {
63
67
call.model.view.hide_me = hidden;
@@ -58,6 +58,10 @@ impl AppState {58
self.change_call_view(|view| view.chat_bubbles = !view.chat_bubbles, cx);58
self.change_call_view(|view| view.chat_bubbles = !view.chat_bubbles, cx);59
}59
}60
60
61
pub fn toggle_call_hide_timer(&mut self, cx: &mut Context<Self>) {62
self.change_call_view(|view| view.hide_timer = !view.hide_timer, cx);63
}64
61
pub fn set_call_hide_me(&mut self, hidden: bool, cx: &mut Context<Self>) {65
pub fn set_call_hide_me(&mut self, hidden: bool, cx: &mut Context<Self>) {62
if let Some(call) = self.call.as_mut() {66
if let Some(call) = self.call.as_mut() {63
call.model.view.hide_me = hidden;67
call.model.view.hide_me = hidden;@@ -173,6 +173,8 @@ pub fn status_line(model: &CallModel, now: Instant) -> (String, Hsla) {
173
173
(model.connecting_text().to_owned(), theme::text_muted())
174
174
} else if model.is_reconnecting() {
175
175
("Reconnecting...".to_owned(), theme::amber())
176
} else if model.view.hide_timer {
177
(String::new(), theme::text_muted())
176
178
} else {
177
179
(model.timer_text(now), theme::text_muted())
178
180
}
@@ -173,6 +173,8 @@ pub fn status_line(model: &CallModel, now: Instant) -> (String, Hsla) {173
(model.connecting_text().to_owned(), theme::text_muted())173
(model.connecting_text().to_owned(), theme::text_muted())174
} else if model.is_reconnecting() {174
} else if model.is_reconnecting() {175
("Reconnecting...".to_owned(), theme::amber())175
("Reconnecting...".to_owned(), theme::amber())176
} else if model.view.hide_timer {177
(String::new(), theme::text_muted())176
} else {178
} else {177
(model.timer_text(now), theme::text_muted())179
(model.timer_text(now), theme::text_muted())178
}180
}