disable lazy load on error response to prevent repeating requests in headlines fragment

This commit is contained in:
Andrew Dolgov 2017-06-06 15:55:26 +03:00
parent 7150fad59b
commit 1f01a82fb5
2 changed files with 4 additions and 1 deletions

View File

@ -241,6 +241,8 @@ public class ArticlePager extends Fragment {
}
} else {
m_lazyLoadDisabled = true;
if (m_lastError == ApiCommon.ApiError.LOGIN_FAILED) {
m_activity.login(true);
} else {

View File

@ -638,10 +638,11 @@ public class HeadlinesFragment extends Fragment {
m_listener.onHeadlinesLoaded(append);
} else {
m_lazyLoadDisabled = true;
if (m_lastError == ApiCommon.ApiError.LOGIN_FAILED) {
m_activity.login(true);
} else {
if (m_lastErrorMessage != null) {
m_activity.toast(getString(getErrorMessage()) + "\n" + m_lastErrorMessage);
} else {