Always show searchItem

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2019-06-03 12:40:13 +02:00
parent 30497f1174
commit 660b2be745

View file

@ -380,7 +380,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
@Override
public void onPrepareOptionsMenu(@NonNull Menu menu) {
super.onPrepareOptionsMenu(menu);
searchItem.setVisible(contactItems.size() > 0);
checkAndHandleDoneMenuItem();
if (adapter.hasFilter()) {
searchItem.expandActionView();
@ -601,10 +600,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
adapter.onLoadMoreComplete(null);
}
if (searchItem != null) {
searchItem.setVisible(newUserItemList.size() > 0);
}
if (swipeRefreshLayout != null) {
swipeRefreshLayout.setRefreshing(false);
}
@ -614,10 +609,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
@Override
public void onError(Throwable e) {
if (searchItem != null) {
searchItem.setVisible(false);
}
if (e instanceof HttpException) {
HttpException exception = (HttpException) e;
switch (exception.code()) {