Fix default server loading timeout

This commit is contained in:
Grishka 2023-10-10 23:43:44 +03:00
parent 48665ebcce
commit 89042113a5
2 changed files with 4 additions and 2 deletions

View File

@ -97,7 +97,7 @@ public class MastodonAPIController{
call.enqueue(new Callback(){
@Override
public void onFailure(@NonNull Call call, @NonNull IOException e){
if(call.isCanceled())
if(req.canceled)
return;
if(BuildConfig.DEBUG)
Log.w(TAG, "["+(session==null ? "no-auth" : session.getID())+"] "+hreq+" failed", e);
@ -109,7 +109,7 @@ public class MastodonAPIController{
@Override
public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException{
if(call.isCanceled())
if(req.canceled)
return;
if(BuildConfig.DEBUG)
Log.d(TAG, "["+(session==null ? "no-auth" : session.getID())+"] "+hreq+" received response: "+response);

View File

@ -199,6 +199,8 @@ public class SplashFragment extends AppKitFragment{
private void loadAndChooseDefaultServer(){
loadingDefaultServer=true;
defaultServerButton.setTextVisible(false);
defaultServerProgress.setVisibility(View.VISIBLE);
new GetCatalogDefaultInstances()
.setCallback(new Callback<>(){
@Override