fix bug when otp was not updated when Activity was not visible

This commit is contained in:
Bruno Bierbaumer 2015-12-19 14:23:21 +01:00
parent 51f3bbc9d4
commit ef22f5fcc5

View file

@ -114,10 +114,8 @@ 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.notifyDataSetChanged();
handler.postDelayed(this, 1000);