Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Set totpElapsed without 1s delay
Browse files Browse the repository at this point in the history
  • Loading branch information
M3DZIK committed Feb 28, 2024
1 parent 18f5a3c commit 6f5d711
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ fun CipherViewScreen(
totpCode = TOTPGenerator.now(params)

while (true) {
delay(TimeUnit.SECONDS.toMillis(1))

totpElapsed = calculateElapsed().toInt()
if (totpElapsed == 30) {
totpCode = TOTPGenerator.now(params)
}

delay(TimeUnit.SECONDS.toMillis(1))
}
}
}
Expand Down

0 comments on commit 6f5d711

Please sign in to comment.