Force the flag to false when errors
This commit is contained in:
parent
5aeb018eb8
commit
3501ac89f0
|
@ -234,7 +234,6 @@ public class DisplayAccountsFragment extends Fragment implements OnRetrieveAccou
|
|||
|
||||
@Override
|
||||
public void onRetrieveAccounts(APIResponse apiResponse) {
|
||||
flag_loading = (apiResponse.getMax_id() == null );
|
||||
mainLoader.setVisibility(View.GONE);
|
||||
nextElementLoader.setVisibility(View.GONE);
|
||||
if( apiResponse.getError() != null){
|
||||
|
@ -244,8 +243,10 @@ public class DisplayAccountsFragment extends Fragment implements OnRetrieveAccou
|
|||
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
swiped = false;
|
||||
flag_loading = false;
|
||||
return;
|
||||
}
|
||||
flag_loading = (apiResponse.getMax_id() == null );
|
||||
List<Account> accounts = apiResponse.getAccounts();
|
||||
if( !swiped && firstLoad && (accounts == null || accounts.size() == 0))
|
||||
textviewNoAction.setVisibility(View.VISIBLE);
|
||||
|
|
|
@ -260,7 +260,6 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
|||
|
||||
@Override
|
||||
public void onRetrieveFeeds(APIResponse apiResponse) {
|
||||
flag_loading = (apiResponse.getMax_id() == null );
|
||||
mainLoader.setVisibility(View.GONE);
|
||||
nextElementLoader.setVisibility(View.GONE);
|
||||
//Discards 404 - error which can often happen due to toots which have been deleted
|
||||
|
@ -271,9 +270,10 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
|||
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||
swipeRefreshLayout.setRefreshing(false);
|
||||
swiped = false;
|
||||
flag_loading = false;
|
||||
return;
|
||||
}
|
||||
|
||||
flag_loading = (apiResponse.getMax_id() == null );
|
||||
List<Status> statuses = apiResponse.getStatuses();
|
||||
if( !swiped && firstLoad && (statuses == null || statuses.size() == 0))
|
||||
textviewNoAction.setVisibility(View.VISIBLE);
|
||||
|
|
Loading…
Reference in New Issue