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
|
@Override
|
||||||
public void onRetrieveAccounts(APIResponse apiResponse) {
|
public void onRetrieveAccounts(APIResponse apiResponse) {
|
||||||
flag_loading = (apiResponse.getMax_id() == null );
|
|
||||||
mainLoader.setVisibility(View.GONE);
|
mainLoader.setVisibility(View.GONE);
|
||||||
nextElementLoader.setVisibility(View.GONE);
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
if( apiResponse.getError() != null){
|
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();
|
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
swiped = false;
|
swiped = false;
|
||||||
|
flag_loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
flag_loading = (apiResponse.getMax_id() == null );
|
||||||
List<Account> accounts = apiResponse.getAccounts();
|
List<Account> accounts = apiResponse.getAccounts();
|
||||||
if( !swiped && firstLoad && (accounts == null || accounts.size() == 0))
|
if( !swiped && firstLoad && (accounts == null || accounts.size() == 0))
|
||||||
textviewNoAction.setVisibility(View.VISIBLE);
|
textviewNoAction.setVisibility(View.VISIBLE);
|
||||||
|
|
|
@ -260,7 +260,6 @@ public class DisplayStatusFragment extends Fragment implements OnRetrieveFeedsIn
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onRetrieveFeeds(APIResponse apiResponse) {
|
public void onRetrieveFeeds(APIResponse apiResponse) {
|
||||||
flag_loading = (apiResponse.getMax_id() == null );
|
|
||||||
mainLoader.setVisibility(View.GONE);
|
mainLoader.setVisibility(View.GONE);
|
||||||
nextElementLoader.setVisibility(View.GONE);
|
nextElementLoader.setVisibility(View.GONE);
|
||||||
//Discards 404 - error which can often happen due to toots which have been deleted
|
//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();
|
Toast.makeText(context, apiResponse.getError().getError(),Toast.LENGTH_LONG).show();
|
||||||
swipeRefreshLayout.setRefreshing(false);
|
swipeRefreshLayout.setRefreshing(false);
|
||||||
swiped = false;
|
swiped = false;
|
||||||
|
flag_loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
flag_loading = (apiResponse.getMax_id() == null );
|
||||||
List<Status> statuses = apiResponse.getStatuses();
|
List<Status> statuses = apiResponse.getStatuses();
|
||||||
if( !swiped && firstLoad && (statuses == null || statuses.size() == 0))
|
if( !swiped && firstLoad && (statuses == null || statuses.size() == 0))
|
||||||
textviewNoAction.setVisibility(View.VISIBLE);
|
textviewNoAction.setVisibility(View.VISIBLE);
|
||||||
|
|
Loading…
Reference in New Issue