diff --git a/nitrokeyapp/secrets_tab/__init__.py b/nitrokeyapp/secrets_tab/__init__.py index 39837170..44963fa4 100644 --- a/nitrokeyapp/secrets_tab/__init__.py +++ b/nitrokeyapp/secrets_tab/__init__.py @@ -178,9 +178,9 @@ def otp_generated(self, data: OtpData) -> None: if data.validity: start, end = data.validity period = int((end - start).total_seconds()) - self.ui.progressBarOtpTimeout.setMaximum(period) + self.ui.progressBarOtpTimeout.setMaximum(period + period) - self.otp_timeout = end + self.otp_timeout = end + (end - start) self.otp_timer.start() self.update_otp_timeout()