Watcher sees the stream meter on the sharer's row in the call (beside their voice line), not in their own call bar
Browse files at this commit3e62c4a7a0ea4db5282787f9b6a5253407b462dfParent: 24596eb- feat
- watcher sees the stream meter on the sharer's row in the call (beside their voice line), not in their own call bar
3 changed files +19 -9
- crates/client/src/gui/camera_view.rs +14 -0
- crates/client/src/gui/dock.rs +3 -7
- crates/client/src/gui/share_view.rs +2 -2
crates/client/src/gui/camera_view.rsmodified+14 -0
| @@ -289,12 +289,26 @@ impl Yumush { | ||
| 289 | 289 | } else { |
| 290 | 290 | Voice::Quiet |
| 291 | 291 | }; |
| 292 | + let screen = self | |
| 293 | + .chat | |
| 294 | + .voice_community() | |
| 295 | + .and_then(|community_id| { | |
| 296 | + self.chat.share_of(community_id, user.id, Kind::Screen) | |
| 297 | + }) | |
| 298 | + .is_some(); | |
| 292 | 299 | caption( |
| 293 | 300 | user.username.clone(), |
| 294 | 301 | voice_line(self.chat.waves.voice(user.id), voice, t), |
| 295 | 302 | t, |
| 296 | 303 | ) |
| 297 | 304 | .h(px(size::CONTROL_SM)) |
| 305 | + .children(screen.then(|| { | |
| 306 | + super::call_bar::share_meter( | |
| 307 | + self.chat.waves.share_line(user.id), | |
| 308 | + t.person(user.id), | |
| 309 | + t, | |
| 310 | + ) | |
| 311 | + })) | |
| 298 | 312 | }) |
| 299 | 313 | .chain( |
| 300 | 314 | (more > 0) |
crates/client/src/gui/dock.rsmodified+3 -7
| @@ -47,13 +47,9 @@ impl Yumush { | ||
| 47 | 47 | screen: self.network.share_source(Kind::Screen).is_some(), |
| 48 | 48 | ghost: self.chat.ghost, |
| 49 | 49 | share: self |
| 50 | - .chat | |
| 51 | - .viewer | |
| 52 | - .as_ref() | |
| 53 | - .filter(|viewer| viewer.kind == Kind::Screen) | |
| 54 | - .map(|viewer| viewer.user_id) | |
| 55 | - .or_else(|| self.network.share_source(Kind::Screen).map(|_| me)) | |
| 56 | - .map(|id| (self.chat.waves.share_line(id).cloned(), t.person(id))), | |
| 50 | + .network | |
| 51 | + .share_source(Kind::Screen) | |
| 52 | + .map(|_| (self.chat.waves.share_line(me).cloned(), t.person(me))), | |
| 57 | 53 | stats: self.chat.stats_at == Some(super::chat::StatsAt::Dock), |
| 58 | 54 | }; |
| 59 | 55 | let go_id = community.id; |
crates/client/src/gui/share_view.rsmodified+2 -2
| @@ -117,8 +117,8 @@ fn chosen(audio: &ShareAudio, app: &AudioApp) -> bool { | ||
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | pub(super) struct Viewer { |
| 120 | - pub(super) user_id: Id, | |
| 121 | - pub(super) kind: Kind, | |
| 120 | + user_id: Id, | |
| 121 | + kind: Kind, | |
| 122 | 122 | shown: bool, |
| 123 | 123 | surface: Entity<Surface>, |
| 124 | 124 | pub(super) fullscreen: bool, |