Skip to content

Commit 9feacca

Browse files
committed
move the tick call to be before the cycle call
1 parent ebc4287 commit 9feacca

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
* 0.2.10
22
* BUGFIX: `on_mount` is now called after the children are generated
3+
* BUGFIX: `on_tick` is now run before the cycle call
34
* 0.2.9
45
* New function: truncate
56
* New border style: "rounded"

anathema-runtime/src/runtime/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,17 +389,17 @@ impl<'rt, 'bp, G: GlobalEventHandler> Frame<'rt, 'bp, G> {
389389
self.poll_events(elapsed, now, backend);
390390
self.drain_deferred_commands();
391391
self.drain_assoc_events();
392+
self.tick_components(self.dt.elapsed());
392393

393394
// TODO:
394395
// this secondary call is here to deal with changes causing changes
395396
// which happens when values are removed or inserted and indices needs updating
396397
self.apply_changes()?;
397398
self.apply_changes()?;
398399

399-
self.tick_components(self.dt.elapsed());
400400
self.cycle(backend)?;
401-
self.init_new_components();
402401

402+
self.init_new_components();
403403
self.post_cycle_events();
404404

405405
*self.dt = Instant::now();

0 commit comments

Comments
 (0)