From e541d6983b288c4ae64e17a5db99fd8bdcd61e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Tue, 1 Dec 2026 03:10:43 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20user=20dropdown=20client?= =?UTF-8?q?=20list=20keeps=20polling=20across=20builder=20tab=20switches?= =?UTF-8?q?=20while=20the=20dropdown=20stays=20open?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/src/gui/builder/users.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/crates/client/src/gui/builder/users.rs b/crates/client/src/gui/builder/users.rs index ef8387f..21941ac 100644 --- a/crates/client/src/gui/builder/users.rs +++ b/crates/client/src/gui/builder/users.rs @@ -269,16 +269,13 @@ impl Yumush { let network = self.network.clone(); self.chat.builder_clients_task = Some(cx.spawn(async move |this, cx| { loop { - let open = this - .update(cx, |yumush, _| { - yumush.chat.view == View::Builder - && yumush.chat.builder_tab == BuilderTab::Users - }) - .unwrap_or(false); - if !open { + let Ok(visible) = this.update(cx, |yumush, _| { + yumush.chat.view == View::Builder + && yumush.chat.builder_tab == BuilderTab::Users + }) else { break; - } - if let Ok(clients) = network.call(ListUpdateClients { user_id }).await { + }; + if visible && let Ok(clients) = network.call(ListUpdateClients { user_id }).await { let _ = this.update(cx, |yumush, cx| { yumush.chat.builder_clients = clients; cx.notify();