corrected an issue where after a filter the passwords are not shown back once we change category
This commit is contained in:
parent
7ddc23ee83
commit
ca06b9626e
1 changed files with 7 additions and 1 deletions
|
@ -91,9 +91,15 @@ public class PasswordFragment extends Fragment{
|
|||
mListener = new OnFragmentInteractionListener() {
|
||||
public void onFragmentInteraction(PasswordItem item) {
|
||||
if (item.getType() == PasswordItem.TYPE_CATEGORY) {
|
||||
passListStack.push((ArrayList<PasswordItem>) recyclerAdapter.getValues().clone());
|
||||
// push the current password list (non filtered plz!)
|
||||
passListStack.push(pathStack.isEmpty() ?
|
||||
PasswordRepository.getPasswords() :
|
||||
PasswordRepository.getPasswords(pathStack.peek()));
|
||||
|
||||
//push the category were we're going
|
||||
pathStack.push(item.getFile());
|
||||
scrollPosition.push(recyclerView.getVerticalScrollbarPosition());
|
||||
|
||||
recyclerView.scrollToPosition(0);
|
||||
recyclerAdapter.clear();
|
||||
recyclerAdapter.addAll(PasswordRepository.getPasswords(item.getFile()));
|
||||
|
|
Loading…
Reference in a new issue