From ef22f5fcc589951911c8c0a8f20dfd5622cdb7fd Mon Sep 17 00:00:00 2001 From: Bruno Bierbaumer Date: Sat, 19 Dec 2015 14:23:21 +0100 Subject: [PATCH] fix bug when otp was not updated when Activity was not visible --- .../java/net/bierbaumer/otp_authenticator/MainActivity.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/net/bierbaumer/otp_authenticator/MainActivity.java b/app/src/main/java/net/bierbaumer/otp_authenticator/MainActivity.java index 44647827..5185dcdb 100644 --- a/app/src/main/java/net/bierbaumer/otp_authenticator/MainActivity.java +++ b/app/src/main/java/net/bierbaumer/otp_authenticator/MainActivity.java @@ -114,9 +114,7 @@ public class MainActivity extends AppCompatActivity implements ActionMode.Callb animation.start(); for(int i =0;i< adapter.getCount();i++){ - if(progress == 0 || adapter.getItem(i).getCurrentOTP() == null){ - adapter.getItem(i).setCurrentOTP(TOTPHelper.generate(adapter.getItem(i).getSecret())); - } + adapter.getItem(i).setCurrentOTP(TOTPHelper.generate(adapter.getItem(i).getSecret())); } adapter.notifyDataSetChanged();