Fix adapter update after QR code scan

This commit is contained in:
Jakob Nixdorf 2017-07-05 08:34:44 +02:00
parent 58ef2bc2ff
commit 6a029f0915
No known key found for this signature in database
GPG key ID: BE99BF86574A7DBC

View file

@ -343,6 +343,7 @@ public class MainActivity extends AppCompatActivity {
Entry e = new Entry(intent.getStringExtra(Intents.Scan.RESULT));
e.setCurrentOTP(TOTPHelper.generate(e.getSecret(), e.getPeriod()));
entries.add(e);
adapter.setEntries(entries);
SettingsHelper.store(this, entries);
adapter.notifyDataSetChanged();