forge
Explore
Log in

Don't you dare go Hollow

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 commit

3e62c4a7a0ea4db5282787f9b6a5253407b462dfAhmet Kaan GümüşParent: 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
Show full message
✨ feat: watcher sees the stream meter on the sharer's row in the call (beside their voice line), not in their own call bar
crates/client/src/gui/camera_view.rsmodified+14 -0
@@ -289,12 +289,26 @@ impl Yumush {
289 } else {289 } else {
290 Voice::Quiet290 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 caption(299 caption(
293 user.username.clone(),300 user.username.clone(),
294 voice_line(self.chat.waves.voice(user.id), voice, t),301 voice_line(self.chat.waves.voice(user.id), voice, t),
295 t,302 t,
296 )303 )
297 .h(px(size::CONTROL_SM))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 .chain(313 .chain(
300 (more > 0)314 (more > 0)
crates/client/src/gui/dock.rsmodified+3 -7
@@ -47,13 +47,9 @@ impl Yumush {
47 screen: self.network.share_source(Kind::Screen).is_some(),47 screen: self.network.share_source(Kind::Screen).is_some(),
48 ghost: self.chat.ghost,48 ghost: self.chat.ghost,
49 share: self49 share: self
50- .chat50+ .network
51- .viewer51+ .share_source(Kind::Screen)
52- .as_ref()52+ .map(|_| (self.chat.waves.share_line(me).cloned(), t.person(me))),
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))),
57 stats: self.chat.stats_at == Some(super::chat::StatsAt::Dock),53 stats: self.chat.stats_at == Some(super::chat::StatsAt::Dock),
58 };54 };
59 let go_id = community.id;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 pub(super) struct Viewer {119 pub(super) struct Viewer {
120- pub(super) user_id: Id,120+ user_id: Id,
121- pub(super) kind: Kind,121+ kind: Kind,
122 shown: bool,122 shown: bool,
123 surface: Entity<Surface>,123 surface: Entity<Surface>,
124 pub(super) fullscreen: bool,124 pub(super) fullscreen: bool,