From cb0343a2c3e3c1fe08c3efd144e54084101e032d Mon Sep 17 00:00:00 2001 From: Bryan Van de Ven Date: Fri, 17 Nov 2023 14:49:53 -0800 Subject: [PATCH] Config.interval instead of Context.total_interval --- src/app.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app.rs b/src/app.rs index cc6747d..241376d 100644 --- a/src/app.rs +++ b/src/app.rs @@ -353,7 +353,7 @@ impl Summary { } fn inflate(&mut self, config: &mut Config, cx: &mut Context) { - for tile_id in config.request_tiles(cx) { + for tile_id in config.request_tiles(cx.view_interval) { config .data_source .fetch_summary_tile(&self.entry_id, tile_id, false); @@ -579,7 +579,7 @@ impl Slot { } fn inflate(&mut self, config: &mut Config, cx: &mut Context) { - for tile_id in config.request_tiles(cx) { + for tile_id in config.request_tiles(cx.view_interval) { config .data_source .fetch_slot_tile(&self.entry_id, tile_id, false); @@ -787,7 +787,7 @@ impl Entry for Slot { } fn inflate_meta(&mut self, config: &mut Config, cx: &mut Context) { - for tile_id in config.request_tiles(cx) { + for tile_id in config.request_tiles(cx.view_interval) { self.fetch_meta_tile(tile_id, config); } } @@ -1322,8 +1322,8 @@ impl Config { } } - fn request_tiles(&mut self, cx: &mut Context) -> Vec { - let request_interval = cx.view_interval.intersection(cx.total_interval); + fn request_tiles(&mut self, view_interval: Interval) -> Vec { + let request_interval = view_interval.intersection(self.interval); if self.last_request_interval == Some(request_interval) { return self.request_tile_cache.clone(); }