From cba38b7b57609a915e0e3e68f4e234737d7f236f Mon Sep 17 00:00:00 2001 From: Alexander Bakker Date: Wed, 27 Dec 2017 22:14:27 +0100 Subject: [PATCH] Correctly display 8 digit codes --- app/src/main/java/me/impy/aegis/KeyProfileHolder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/me/impy/aegis/KeyProfileHolder.java b/app/src/main/java/me/impy/aegis/KeyProfileHolder.java index 0d92b196..1a8f6c65 100644 --- a/app/src/main/java/me/impy/aegis/KeyProfileHolder.java +++ b/app/src/main/java/me/impy/aegis/KeyProfileHolder.java @@ -75,7 +75,7 @@ public class KeyProfileHolder extends RecyclerView.ViewHolder { // refresh the code String otp = _keyProfile.refreshCode(); - _profileCode.setText(otp.substring(0, 3) + " " + otp.substring(3)); + _profileCode.setText(otp.substring(0, otp.length() / 2) + " " + otp.substring(otp.length() / 2)); // calculate the progress the bar should start at long millisTillRotation = _keyProfile.getEntry().getInfo().getMillisTillNextRotation();