From: Simon Tatham Date: Sun, 31 Dec 2023 13:36:15 +0000 (+0000) Subject: Call ensure_enough_rendered even if feed update failed. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=f17cce0edd229381afd4f1605bf4e7d17074591e;p=mastodonochrome.git Call ensure_enough_rendered even if feed update failed. Because then we're tinkering with the ExtendableIndicator, so we still need to re-check our drawability. --- diff --git a/src/file.rs b/src/file.rs index 0e44605..f72d932 100644 --- a/src/file.rs +++ b/src/file.rs @@ -427,8 +427,8 @@ impl ActivityState for FeedFile { }, Pr('0') | Home => { if self.at_top() && self.contents.extender.is_some() { - match client.fetch_feed(&self.contents.id, - FeedExtend::Past) { + let action = match client.fetch_feed(&self.contents.id, + FeedExtend::Past) { Ok(any_new) => { self.rendered.remove(&self.contents.first_index()); if let Some(i) = self.contents.extender_index() { @@ -442,11 +442,11 @@ impl ActivityState for FeedFile { } self.contents.update_items(client); - self.ensure_enough_rendered(); LogicalAction::Nothing }, Err(e) => LogicalAction::Error(e), - } + }; + action } else { self.goto_top(); LogicalAction::Nothing