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 {
289289 } else {
290290 Voice::Quiet
291291 };
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();
292299 caption(
293300 user.username.clone(),
294301 voice_line(self.chat.waves.voice(user.id), voice, t),
295302 t,
296303 )
297304 .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+ }))
298312 })
299313 .chain(
300314 (more > 0)
crates/client/src/gui/dock.rsmodified+3 -7
@@ -47,13 +47,9 @@ impl Yumush {
4747 screen: self.network.share_source(Kind::Screen).is_some(),
4848 ghost: self.chat.ghost,
4949 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))),
5753 stats: self.chat.stats_at == Some(super::chat::StatsAt::Dock),
5854 };
5955 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 {
117117 }
118118
119119 pub(super) struct Viewer {
120- pub(super) user_id: Id,
121- pub(super) kind: Kind,
120+ user_id: Id,
121+ kind: Kind,
122122 shown: bool,
123123 surface: Entity<Surface>,
124124 pub(super) fullscreen: bool,