Merge 'add border behind pfp' #597

Hello new contributor!

jglad (4):
      #597 add border behind pfp
      replace with full circle border
      make optional
      fix formatting
This commit is contained in:
William Casarin
2025-02-03 18:40:59 -08:00
8 changed files with 104 additions and 34 deletions

View File

@@ -113,13 +113,21 @@ 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)));
.and_then(|p| {
Some(
ui::ProfilePic::from_profile(self.img_cache, p)?
.size(pfp_size)
.border(2.0),
)
});
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),
ui::ProfilePic::new(self.img_cache, ui::ProfilePic::no_pfp_url())
.size(pfp_size)
.border(2.0),
);
}