summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorzeapo <mohamed@zenadi.com>2017-09-10 16:25:54 +0200
committerzeapo <mohamed@zenadi.com>2017-09-10 16:25:54 +0200
commit1c43d6c7e4592b82f719cbd088961a137d498383 (patch)
tree0817c550bc8a0d04253c5fa26a52fc700204c4f1 /app/src/main
parentbc173404c9d233589d30ebcc013875890af86fe0 (diff)
dismiss action mode after we've finished moving passwords
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java6
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/PasswordStore.java3
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java2
3 files changed, 10 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 646e44c7..2b0fa7c1 100644
--- a/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java
+++ b/app/src/main/java/com/zeapo/pwdstore/PasswordFragment.java
@@ -217,4 +217,10 @@ public class PasswordFragment extends Fragment{
public boolean isNotEmpty() {
return !passListStack.isEmpty();
}
+
+ public void dismissActionMode() {
+ if (recyclerAdapter != null && recyclerAdapter.mActionMode != null) {
+ recyclerAdapter.mActionMode.finish();
+ }
+ }
}
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java
index 5f4e3096..acfadf99 100644
--- a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java
+++ b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java
@@ -655,6 +655,9 @@ public class PasswordStore extends AppCompatActivity {
}
}
updateListAdapter();
+ if (plist != null) {
+ plist.dismissActionMode();
+ }
break;
}
}
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java
index 01ee0a98..3e5e1c74 100644
--- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java
+++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRecyclerAdapter.java
@@ -17,7 +17,7 @@ import java.util.TreeSet;
public class PasswordRecyclerAdapter extends EntryRecyclerAdapter {
private final PasswordStore activity;
private final PasswordFragment.OnFragmentInteractionListener listener;
- private ActionMode mActionMode;
+ public ActionMode mActionMode;
private Boolean canEdit;
// Provide a suitable constructor (depends on the kind of dataset)