Skip to content

Commit

Permalink
Config.interval instead of Context.total_interval
Browse files Browse the repository at this point in the history
  • Loading branch information
bryevdv committed Nov 17, 2023
1 parent db90cb4 commit cb0343a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -1322,8 +1322,8 @@ impl Config {
}
}

fn request_tiles(&mut self, cx: &mut Context) -> Vec<TileID> {
let request_interval = cx.view_interval.intersection(cx.total_interval);
fn request_tiles(&mut self, view_interval: Interval) -> Vec<TileID> {
let request_interval = view_interval.intersection(self.interval);
if self.last_request_interval == Some(request_interval) {
return self.request_tile_cache.clone();
}
Expand Down

0 comments on commit cb0343a

Please sign in to comment.