From: Simon Tatham Date: Tue, 2 Jan 2024 13:39:56 +0000 (+0000) Subject: Fix an edge case of watching a nearly empty feed. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=073b7443694a77a99dcee4dd78af5de3eb560ee4;p=mastodonochrome.git Fix an edge case of watching a nearly empty feed. This just came up when testing against a dev instance, which starts off with 0 posts anywhere, of course. --- diff --git a/src/file.rs b/src/file.rs index 774d97c..5773a95 100644 --- a/src/file.rs +++ b/src/file.rs @@ -591,6 +591,12 @@ impl if self.contents.source.updated(feeds_updated) { self.contents.update_items(client); self.ensure_enough_rendered(); + + // If someone's home feed was almost completely empty, + // then adding a new post at the bottom may in fact cause + // there to have been a rendering overshoot where there + // previously wasn't! + self.fix_overshoot_at_top(); } } }