summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorzeapo <mohamed@zenadi.com>2014-10-29 22:12:38 +0100
committerzeapo <mohamed@zenadi.com>2014-10-29 22:12:38 +0100
commitca06b9626e33c195ff9c183be6c4e33a637bebf1 (patch)
tree54c91b70b4562e3859d65a21d77d93d2372e69ab /app/src/main/java
parent7ddc23ee839c8648b60217101862b739df4018c3 (diff)
corrected an issue where after a filter the passwords are not shown back once we change category
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java8
1 files changed, 7 insertions, 1 deletions
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<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()));