make optional
This commit is contained in:
@@ -228,7 +228,7 @@ impl<'a> NoteView<'a> {
|
||||
anim_speed,
|
||||
);
|
||||
|
||||
ui.put(rect, ui::ProfilePic::new(self.img_cache, pic).size(size))
|
||||
ui.put(rect, ui::ProfilePic::new(self.img_cache, pic).size(size).border(2.0))
|
||||
.on_hover_ui_at_pointer(|ui| {
|
||||
ui.set_max_width(300.0);
|
||||
ui.add(ui::ProfilePreview::new(
|
||||
@@ -246,7 +246,8 @@ impl<'a> NoteView<'a> {
|
||||
None => ui
|
||||
.add(
|
||||
ui::ProfilePic::new(self.img_cache, ui::ProfilePic::no_pfp_url())
|
||||
.size(pfp_size),
|
||||
.size(pfp_size)
|
||||
.border(2.0),
|
||||
)
|
||||
.interact(sense),
|
||||
}
|
||||
|
||||
@@ -113,13 +113,17 @@ 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),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user