add nullchecks since elements are annotated as nullable

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2021-05-02 23:28:36 +02:00
parent 34041b0358
commit a247509aa1
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -128,6 +128,7 @@ public class ContactsController extends BaseController implements SearchView.OnQ
@BindView(R.id.loading_content)
LinearLayout loadingContent;
@BindView(R.id.recycler_view)
RecyclerView recyclerView;
@ -152,9 +153,6 @@ public class ContactsController extends BaseController implements SearchView.OnQ
@BindView(R.id.generic_rv_layout)
CoordinatorLayout genericRvLayout;
@Inject
NcApi ncApi;
@Inject
UserUtils userUtils;
@ -164,6 +162,9 @@ public class ContactsController extends BaseController implements SearchView.OnQ
@Inject
AppPreferences appPreferences;
@Inject
NcApi ncApi;
private String credentials;
private UserEntity currentUser;
private Disposable contactsQueryDisposable;
@ -996,11 +997,19 @@ public class ContactsController extends BaseController implements SearchView.OnQ
private void toggleNewCallHeaderVisibility(boolean showInitialLayout) {
if (showInitialLayout) {
if (initialRelativeLayout != null) {
initialRelativeLayout.setVisibility(View.VISIBLE);
}
if (secondaryRelativeLayout != null) {
secondaryRelativeLayout.setVisibility(View.GONE);
}
} else {
if (initialRelativeLayout != null) {
initialRelativeLayout.setVisibility(View.GONE);
}
if (secondaryRelativeLayout != null) {
secondaryRelativeLayout.setVisibility(View.VISIBLE);
}
}
}
}