From a14f3afa2aab52f686c2bc0a445ca359282922ae Mon Sep 17 00:00:00 2001 From: edouardparis Date: Wed, 1 Nov 2023 14:18:27 +0100 Subject: [PATCH] installer: do not reload last step on next message If a user clicked very fast a lot on the Next button to trigger multiple Next messages, then the last step of the install reloads multiple time. This commit introduce a check that ignore next message if the step is the last one. --- gui/src/installer/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/src/installer/mod.rs b/gui/src/installer/mod.rs index d24701cb..99c66e77 100644 --- a/gui/src/installer/mod.rs +++ b/gui/src/installer/mod.rs @@ -106,6 +106,10 @@ impl Installer { if current_step.apply(&mut self.context) { if self.current < self.steps.len() - 1 { self.current += 1; + } else { + // The step is already the last current step. + // No need to reload the current step. + return Command::none(); } // skip the step according to the current context. while self