From a9b5c1d867b35531d1c15b888401609b86dee657 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Mon, 26 Jun 2023 12:45:50 +0200 Subject: [PATCH] Remove unnecessary call to context.notify --- crates/call/src/room.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/call/src/room.rs b/crates/call/src/room.rs index 00c6b43eb3..48a35b29f6 100644 --- a/crates/call/src/room.rs +++ b/crates/call/src/room.rs @@ -1210,8 +1210,9 @@ impl Room { pub fn toggle_deafen(&mut self, cx: &mut ModelContext) -> Result>> { if let Some(live_kit) = self.live_kit.as_mut() { (*live_kit).deafened = !live_kit.deafened; - cx.notify(); + let mut tasks = Vec::with_capacity(self.remote_participants.len()); + // Context notification is sent within set_mute itself. let _ = Self::set_mute(live_kit, live_kit.deafened, cx)?; // todo (osiewicz): we probably want to schedule it on fg/bg? for participant in self.remote_participants.values() { for track in live_kit