|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|