pfp: remove border except for profile

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2025-02-03 19:45:32 -08:00
parent 635c9770de
commit 96481a47f3
5 changed files with 14 additions and 38 deletions

View File

@@ -113,21 +113,13 @@ impl<'a> PostView<'a> {
.get_profile_by_pubkey(txn, self.poster.pubkey.bytes())
.as_ref()
.ok()
.and_then(|p| {
Some(
ui::ProfilePic::from_profile(self.img_cache, p)?
.size(pfp_size)
.border(2.0),
)
});
.and_then(|p| Some(ui::ProfilePic::from_profile(self.img_cache, p)?.size(pfp_size)));
if let Some(pfp) = poster_pfp {
ui.add(pfp);
} else {
ui.add(
ui::ProfilePic::new(self.img_cache, ui::ProfilePic::no_pfp_url())
.size(pfp_size)
.border(2.0),
ui::ProfilePic::new(self.img_cache, ui::ProfilePic::no_pfp_url()).size(pfp_size),
);
}