make Widget impl ProfilePic mutably

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2025-04-29 16:05:58 -04:00
parent 640bf742c0
commit 7d2112b472
10 changed files with 30 additions and 21 deletions

View File

@@ -142,11 +142,11 @@ impl<'a, 'd> PostView<'a, 'd> {
Some(ProfilePic::from_profile(self.note_context.img_cache, p)?.size(pfp_size))
});
if let Some(pfp) = poster_pfp {
ui.add(pfp);
if let Some(mut pfp) = poster_pfp {
ui.add(&mut pfp);
} else {
ui.add(
ProfilePic::new(self.note_context.img_cache, notedeck::profile::no_pfp_url())
&mut ProfilePic::new(self.note_context.img_cache, notedeck::profile::no_pfp_url())
.size(pfp_size),
);
}