diff --git a/crates/client/src/gui/camera_view.rs b/crates/client/src/gui/camera_view.rs index cf957d7..291ba8c 100644 --- a/crates/client/src/gui/camera_view.rs +++ b/crates/client/src/gui/camera_view.rs @@ -289,12 +289,26 @@ impl Yumush { } else { Voice::Quiet }; + let screen = self + .chat + .voice_community() + .and_then(|community_id| { + self.chat.share_of(community_id, user.id, Kind::Screen) + }) + .is_some(); caption( user.username.clone(), voice_line(self.chat.waves.voice(user.id), voice, t), t, ) .h(px(size::CONTROL_SM)) + .children(screen.then(|| { + super::call_bar::share_meter( + self.chat.waves.share_line(user.id), + t.person(user.id), + t, + ) + })) }) .chain( (more > 0) diff --git a/crates/client/src/gui/dock.rs b/crates/client/src/gui/dock.rs index 249ec81..3dd68b9 100644 --- a/crates/client/src/gui/dock.rs +++ b/crates/client/src/gui/dock.rs @@ -47,13 +47,9 @@ impl Yumush { screen: self.network.share_source(Kind::Screen).is_some(), ghost: self.chat.ghost, share: self - .chat - .viewer - .as_ref() - .filter(|viewer| viewer.kind == Kind::Screen) - .map(|viewer| viewer.user_id) - .or_else(|| self.network.share_source(Kind::Screen).map(|_| me)) - .map(|id| (self.chat.waves.share_line(id).cloned(), t.person(id))), + .network + .share_source(Kind::Screen) + .map(|_| (self.chat.waves.share_line(me).cloned(), t.person(me))), stats: self.chat.stats_at == Some(super::chat::StatsAt::Dock), }; let go_id = community.id; diff --git a/crates/client/src/gui/share_view.rs b/crates/client/src/gui/share_view.rs index a31bb89..f54317f 100644 --- a/crates/client/src/gui/share_view.rs +++ b/crates/client/src/gui/share_view.rs @@ -117,8 +117,8 @@ fn chosen(audio: &ShareAudio, app: &AudioApp) -> bool { } pub(super) struct Viewer { - pub(super) user_id: Id, - pub(super) kind: Kind, + user_id: Id, + kind: Kind, shown: bool, surface: Entity, pub(super) fullscreen: bool,