Skip to content

Commit

Permalink
Initial, inefficient, forced rerender of VDOM.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlterionX committed Oct 8, 2019
1 parent 6f9b2e2 commit 168906e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vdom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ impl<Ms: Clone, Mdl, ElC: View<Ms> + 'static, GMs: 'static> App<Ms, Mdl, ElC, GM
// render as per normal for seed behavior. -- Executed here to ensure that all state has
// been initialized with a bootstrap version. The bootstrap will be replaced after first
// render.
self.process_cmd_and_msg_queue(
self.process_cmd_and_msg_queue_with_forced_render(
self.cfg
.initial_orders
.replace(None)
Expand Down Expand Up @@ -521,6 +521,10 @@ impl<Ms: Clone, Mdl, ElC: View<Ms> + 'static, GMs: 'static> App<Ms, Mdl, ElC, GM
self.process_cmd_and_msg_queue(queue);
}

pub fn process_cmd_and_msg_queue_with_forced_render(&self, queue: VecDeque<Effect<Ms, GMs>>) {
self.process_cmd_and_msg_queue(queue);
self.rerender_vdom();
}
pub fn process_cmd_and_msg_queue(&self, mut queue: VecDeque<Effect<Ms, GMs>>) {
while let Some(effect) = queue.pop_front() {
match effect {
Expand Down

0 comments on commit 168906e

Please sign in to comment.