aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorFabian Henneke <FabianHenneke@users.noreply.github.com>2020-03-29 09:35:54 +0200
committerGitHub <noreply@github.com>2020-03-29 13:05:54 +0530
commit6aed471f318052e86c9a36c7b1da7e569f16a123 (patch)
tree227c436c059491186c3ef0ed9e878b5ace4b920d /app/src/main/java
parent29427a061b33bf25e5c921faeeea2e93129d703d (diff)
Workaround and potential fix for search issues (#677)
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt
index 7495cff1..2a5343fd 100644
--- a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.kt
@@ -159,7 +159,7 @@ class PasswordStore : AppCompatActivity() {
}
}
- override fun onCreateOptionsMenu(menu: Menu): Boolean {
+ override fun onPrepareOptionsMenu(menu: Menu): Boolean {
// Inflate the menu; this adds items to the action bar if it is present.
menuInflater.inflate(R.menu.main_menu, menu)
searchItem = menu.findItem(R.id.action_search)
@@ -167,6 +167,7 @@ class PasswordStore : AppCompatActivity() {
searchView.setOnQueryTextListener(
object : OnQueryTextListener {
override fun onQueryTextSubmit(s: String): Boolean {
+ filterListAdapter(s)
searchView.clearFocus()
return true
}
@@ -193,7 +194,7 @@ class PasswordStore : AppCompatActivity() {
if (settings.getBoolean("search_on_start", false)) {
searchItem.expandActionView()
}
- return super.onCreateOptionsMenu(menu)
+ return super.onPrepareOptionsMenu(menu)
}
// Handle action bar item clicks here. The action bar will