Merge branch 'master' into donations

This commit is contained in:
Grishka 2024-04-21 18:11:32 +03:00
commit ea53200e23
2 changed files with 6 additions and 2 deletions

View File

@ -123,8 +123,10 @@ public class MastodonAPIController{
@Override @Override
public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException{ public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException{
if(req.canceled) if(req.canceled){
response.close();
return; return;
}
if(BuildConfig.DEBUG) if(BuildConfig.DEBUG)
Log.d(TAG, logTag(session)+hreq+" received response: "+response); Log.d(TAG, logTag(session)+hreq+" received response: "+response);
synchronized(req){ synchronized(req){

View File

@ -316,8 +316,10 @@ abstract class InstanceCatalogFragment extends BaseRecyclerFragment<CatalogInsta
loadingInstanceRedirectRequest=null; loadingInstanceRedirectRequest=null;
loadingInstanceDomain=null; loadingInstanceDomain=null;
Activity a=getActivity(); Activity a=getActivity();
if(a==null) if(a==null) {
response.close();
return; return;
}
try(response){ try(response){
if(!response.isSuccessful()){ if(!response.isSuccessful()){
a.runOnUiThread(()->{ a.runOnUiThread(()->{