|
|
@ -92,10 +92,9 @@ public class FragmentContacts extends FragmentBase {
|
|
|
|
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
|
|
|
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
|
|
|
|
super.onActivityCreated(savedInstanceState);
|
|
|
|
super.onActivityCreated(savedInstanceState);
|
|
|
|
|
|
|
|
|
|
|
|
if (savedInstanceState != null) {
|
|
|
|
if (savedInstanceState != null)
|
|
|
|
searching = savedInstanceState.getString("fair:searching");
|
|
|
|
searching = savedInstanceState.getString("fair:searching");
|
|
|
|
adapter.search(searching);
|
|
|
|
adapter.search(searching);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DB db = DB.getInstance(getContext());
|
|
|
|
DB db = DB.getInstance(getContext());
|
|
|
|
db.contact().liveContacts().observe(getViewLifecycleOwner(), new Observer<List<TupleContactEx>>() {
|
|
|
|
db.contact().liveContacts().observe(getViewLifecycleOwner(), new Observer<List<TupleContactEx>>() {
|
|
|
@ -130,8 +129,10 @@ public class FragmentContacts extends FragmentBase {
|
|
|
|
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
|
|
|
searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean onQueryTextChange(String newText) {
|
|
|
|
public boolean onQueryTextChange(String newText) {
|
|
|
|
searching = newText;
|
|
|
|
if (getView() != null) {
|
|
|
|
adapter.search(newText);
|
|
|
|
searching = newText;
|
|
|
|
|
|
|
|
adapter.search(newText);
|
|
|
|
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|