From 073b7443694a77a99dcee4dd78af5de3eb560ee4 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 2 Jan 2024 13:39:56 +0000 Subject: [PATCH] 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. --- src/file.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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(); } } } -- 2.30.2