Fix default server loading timeout
This commit is contained in:
parent
48665ebcce
commit
89042113a5
|
@ -97,7 +97,7 @@ public class MastodonAPIController{
|
||||||
call.enqueue(new Callback(){
|
call.enqueue(new Callback(){
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call call, @NonNull IOException e){
|
public void onFailure(@NonNull Call call, @NonNull IOException e){
|
||||||
if(call.isCanceled())
|
if(req.canceled)
|
||||||
return;
|
return;
|
||||||
if(BuildConfig.DEBUG)
|
if(BuildConfig.DEBUG)
|
||||||
Log.w(TAG, "["+(session==null ? "no-auth" : session.getID())+"] "+hreq+" failed", e);
|
Log.w(TAG, "["+(session==null ? "no-auth" : session.getID())+"] "+hreq+" failed", e);
|
||||||
|
@ -109,7 +109,7 @@ 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(call.isCanceled())
|
if(req.canceled)
|
||||||
return;
|
return;
|
||||||
if(BuildConfig.DEBUG)
|
if(BuildConfig.DEBUG)
|
||||||
Log.d(TAG, "["+(session==null ? "no-auth" : session.getID())+"] "+hreq+" received response: "+response);
|
Log.d(TAG, "["+(session==null ? "no-auth" : session.getID())+"] "+hreq+" received response: "+response);
|
||||||
|
|
|
@ -199,6 +199,8 @@ public class SplashFragment extends AppKitFragment{
|
||||||
|
|
||||||
private void loadAndChooseDefaultServer(){
|
private void loadAndChooseDefaultServer(){
|
||||||
loadingDefaultServer=true;
|
loadingDefaultServer=true;
|
||||||
|
defaultServerButton.setTextVisible(false);
|
||||||
|
defaultServerProgress.setVisibility(View.VISIBLE);
|
||||||
new GetCatalogDefaultInstances()
|
new GetCatalogDefaultInstances()
|
||||||
.setCallback(new Callback<>(){
|
.setCallback(new Callback<>(){
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue