Crash fixes

This commit is contained in:
Grishka 2022-04-20 22:38:20 +03:00
parent 5eb5a42465
commit 1ee55a643e
2 changed files with 9 additions and 5 deletions

View File

@ -547,8 +547,10 @@ public class ProfileFragment extends LoaderFragment implements OnBackPressedList
.setCallback(new Callback<>(){
@Override
public void onSuccess(List<Relationship> result){
relationship=result.get(0);
updateRelationship();
if(!result.isEmpty()){
relationship=result.get(0);
updateRelationship();
}
}
@Override

View File

@ -401,9 +401,11 @@ public class InstanceCatalogFragment extends BaseRecyclerFragment<CatalogInstanc
instanceProgressDialog=new ProgressDialog(getActivity());
instanceProgressDialog.setMessage(getString(R.string.loading_instance));
instanceProgressDialog.setOnCancelListener(dialog->{
loadingInstanceRequest.cancel();
loadingInstanceRequest=null;
loadingInstanceDomain=null;
if(loadingInstanceRequest!=null){
loadingInstanceRequest.cancel();
loadingInstanceRequest=null;
loadingInstanceDomain=null;
}
});
instanceProgressDialog.show();
}