Compare commits

...

2 commits

Author SHA1 Message Date
6f5b494a25
fix: batch load fills multiple identical objects
in case of an announce and a view, we get the attachments only once
otherwise and frontend may overwrite cache with the empty one. this is
wasteful because we clone everytime tho, TODO!
2024-07-06 04:39:14 +02:00
a901ae7656
fix(web): little spacing between posts 2024-07-06 04:37:09 +02:00
2 changed files with 5 additions and 3 deletions

View file

@ -36,8 +36,10 @@ impl BatchFillable for Vec<RichActivity> {
}
for element in self.iter_mut() {
if let Some(ref object) = element.object {
if let Some(v) = map.remove(&object.internal) {
element.accept(v, tx).await?;
if let Some(v) = map.get(&object.internal) {
// TODO wasteful because we clone every time, but we cant do remove otherwise multiple
// identical objects wont get filled (for example, a post boosted twice)
element.accept(v.clone(), tx).await?;
}
}
}

View file

@ -162,7 +162,7 @@ pub fn Object(
</tr>
</table>
{post}
<div class="mt-s ml-1 rev">
<div class="mb-s ml-1 rev">
{tag_badges}
{audience_badge}
<span style="white-space:nowrap">