Hopefully fix a bug where keys from a previously opened database would still be visible

This commit is contained in:
Alexander Bakker 2017-12-08 19:09:35 +01:00
parent 515e3a24eb
commit 71eb487f85
2 changed files with 3 additions and 2 deletions

View file

@ -48,7 +48,7 @@ public class MainActivity extends AppCompatActivity {
private static final int CODE_IMPORT = 4;
private KeyProfileAdapter _keyProfileAdapter;
private ArrayList<KeyProfile> _keyProfiles = new ArrayList<>();
private ArrayList<KeyProfile> _keyProfiles;
private DatabaseManager _db;
private boolean _nightMode = false;
@ -112,6 +112,7 @@ public class MainActivity extends AppCompatActivity {
LinearLayoutManager mLayoutManager = new LinearLayoutManager(this);
rvKeyProfiles.setLayoutManager(mLayoutManager);
_keyProfiles = new ArrayList<>();
_keyProfileAdapter = new KeyProfileAdapter(_keyProfiles);
_keyProfileAdapter.setOnItemClickListener((position, v) -> createBottomSheet(position).show());