notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 531734108002065e03bc11abc24061bf452cebcc
parent 3e96f815b123144138c1c05a67381878e632c71b
Author: William Casarin <jb55@jb55.com>
Date:   Sat, 10 Feb 2024 17:13:13 -0800

name: don't render display_name first if its empty

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/app.rs | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/app.rs b/src/app.rs @@ -482,8 +482,8 @@ fn render_username(ui: &mut egui::Ui, profile: Option<&ProfileRecord>, _pk: &[u8 //ui.spacing_mut().item_spacing.x = 0.0; if let Some(profile) = profile { if let Some(prof) = profile.record.profile() { - if let Some(display_name) = prof.display_name() { - ui_abbreviate_name(ui, display_name, 20); + if prof.display_name().is_some() && prof.display_name().unwrap() != "" { + ui_abbreviate_name(ui, prof.display_name().unwrap(), 20); } else if let Some(name) = prof.name() { ui_abbreviate_name(ui, name, 20); }