mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 06:08:31 +02:00
Restore search
This commit is contained in:
@@ -92,10 +92,9 @@ public class FragmentContacts extends FragmentBase {
|
||||
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
if (savedInstanceState != null)
|
||||
searching = savedInstanceState.getString("fair:searching");
|
||||
adapter.search(searching);
|
||||
}
|
||||
adapter.search(searching);
|
||||
|
||||
DB db = DB.getInstance(getContext());
|
||||
db.contact().liveContacts().observe(getViewLifecycleOwner(), new Observer<List<TupleContactEx>>() {
|
||||
@@ -130,8 +129,10 @@ public class FragmentContacts extends FragmentBase {
|
||||
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
||||
@Override
|
||||
public boolean onQueryTextChange(String newText) {
|
||||
searching = newText;
|
||||
adapter.search(newText);
|
||||
if (getView() != null) {
|
||||
searching = newText;
|
||||
adapter.search(newText);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user