From 03d5e7bfcf85c8b11bea27d9e6d6c618cab10ac9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Moreno?= Date: Tue, 14 Nov 2017 02:51:43 +0100 Subject: [PATCH] Doesn't set the username if it's empty --- src/widgets/message.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/widgets/message.rs b/src/widgets/message.rs index 9a78a6c9..5a010361 100644 --- a/src/widgets/message.rs +++ b/src/widgets/message.rs @@ -127,7 +127,10 @@ impl<'a> MessageBox<'a> { if let Ok(pixbuf) = Pixbuf::new_from_file_at_scale(&avatar, 40, 40, false) { a.set_from_pixbuf(&pixbuf); } - u.set_markup(&format!("{}", name)); + if !name.is_empty() { + u.set_markup(&format!("{}", name)); + } + gtk::Continue(false) } });