From ca06b9626e33c195ff9c183be6c4e33a637bebf1 Mon Sep 17 00:00:00 2001 From: zeapo Date: Wed, 29 Oct 2014 22:12:38 +0100 Subject: corrected an issue where after a filter the passwords are not shown back once we change category --- app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/src/main/java') diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java index 1dcce1b8..fa97fcc4 100644 --- a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java +++ b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java @@ -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) 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())); -- cgit v1.2.3