ui: add initial Profile hover previews
The idea with these is that on notedeck you can just hover your cursor over a profile link to see the profile. I just have a stub for now, but full design coming soon after. Also simplify the preview system even further with a macro. In the future I imagine we can grep every preview in the codebase, and then include this as a string inside this macro. This is some kind of template metaprogramming insanity but in theory it could work. Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -44,7 +44,7 @@ impl<'a> Widget for Username<'a> {
|
||||
};
|
||||
|
||||
if let Some(profile) = self.profile {
|
||||
if let Some(prof) = profile.record.profile() {
|
||||
if let Some(prof) = profile.record().profile() {
|
||||
if prof.display_name().is_some() && prof.display_name().unwrap() != "" {
|
||||
ui_abbreviate_name(ui, prof.display_name().unwrap(), self.abbrev, color);
|
||||
} else if let Some(name) = prof.name() {
|
||||
|
||||
Reference in New Issue
Block a user