From a01a53fc9301dedf5e308ec025d923a297ada822 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 02:30:15 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20builder=20user=20dropdo?= =?UTF-8?q?wn=20always=20shows=20the=20friends=20button;=20empty=20list=20?= =?UTF-8?q?says=20No=20friends?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/lang/en/builder_users.txt | 1 + crates/client/lang/tr/builder_users.txt | 1 + crates/client/src/gui/builder/users.rs | 11 ++++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/client/lang/en/builder_users.txt b/crates/client/lang/en/builder_users.txt index d083e7c..c2539bd 100644 --- a/crates/client/lang/en/builder_users.txt +++ b/crates/client/lang/en/builder_users.txt @@ -42,6 +42,7 @@ group_danger = Danger group_sessions = Sessions group_friends = Friends tag_builder = Builder +no_friends = No friends friends_count = {count} friends group_clients = Clients no_clients = No clients diff --git a/crates/client/lang/tr/builder_users.txt b/crates/client/lang/tr/builder_users.txt index 72982b8..dba3b9d 100644 --- a/crates/client/lang/tr/builder_users.txt +++ b/crates/client/lang/tr/builder_users.txt @@ -42,6 +42,7 @@ group_danger = Tehlike group_sessions = Oturumlar group_friends = Arkadaşlar tag_builder = Kurucu +no_friends = Arkadaş yok friends_count = {count} arkadaş group_clients = İstemciler no_clients = İstemci yok diff --git a/crates/client/src/gui/builder/users.rs b/crates/client/src/gui/builder/users.rs index 7de431e..ef8387f 100644 --- a/crates/client/src/gui/builder/users.rs +++ b/crates/client/src/gui/builder/users.rs @@ -579,9 +579,6 @@ impl Yumush { fn builder_friend_list(&self, palette: Palette) -> Vec { let friends = self.chat.builder_friends.clone(); - if friends.is_empty() { - return Vec::new(); - } let search = self.chat.builder_friend_search.clone(); let avatars = self.chat.avatars.clone(); let label = w().builder_users.friends_count(friends.len()); @@ -618,6 +615,14 @@ impl Yumush { .overflow_y_scroll() .flex() .flex_col() + .when(friends.is_empty(), |list| { + list.child( + div() + .text_size(text(text::CAPTION)) + .text_color(palette.muted) + .child(w().builder_users.no_friends), + ) + }) .children( friends .iter()