diff --git a/Chronos/App/Tabs/Tokens/Row/TOTPRowView.swift b/Chronos/App/Tabs/Tokens/Row/TOTPRowView.swift index 358885a..5013da4 100644 --- a/Chronos/App/Tabs/Tokens/Row/TOTPRowView.swift +++ b/Chronos/App/Tabs/Tokens/Row/TOTPRowView.swift @@ -19,9 +19,6 @@ struct TOTPRowView: View { .fontWeight(.light) .lineLimit(1) .onAppear(perform: updateOtp) - .onReceive(timer) { _ in - updateOtp() - } Spacer() @@ -64,6 +61,10 @@ struct TOTPRowView: View { // Circle progress will look smooth; however, the high redraw count causes significant CPU load. // progress = timeLeft / Double(token.period) progress = Double(secsLeft) / Double(token.period) + + if secsLeft == token.period { + updateOtp() + } } private func formatOtp(otp: String) -> String {