fix indeterminate progressbar not completing if http request fails
This commit is contained in:
parent
060fef90fd
commit
85ef8d8d13
@ -296,6 +296,7 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
|
|||||||
if (isDetached()) return;
|
if (isDetached()) return;
|
||||||
|
|
||||||
m_activity.setProgressBarVisibility(false);
|
m_activity.setProgressBarVisibility(false);
|
||||||
|
m_activity.m_pullToRefreshAttacher.setRefreshComplete();
|
||||||
|
|
||||||
if (getView() != null) {
|
if (getView() != null) {
|
||||||
ListView list = (ListView)getView().findViewById(R.id.feeds);
|
ListView list = (ListView)getView().findViewById(R.id.feeds);
|
||||||
@ -335,10 +336,6 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
|
|||||||
//m_adapter.notifyDataSetChanged(); (done by sortCats)
|
//m_adapter.notifyDataSetChanged(); (done by sortCats)
|
||||||
m_activity.setLoadingStatus(R.string.blank, false);
|
m_activity.setLoadingStatus(R.string.blank, false);
|
||||||
|
|
||||||
if (isAdded()) {
|
|
||||||
m_activity.m_pullToRefreshAttacher.setRefreshComplete();
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,6 +442,7 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_activity.setProgressBarVisibility(false);
|
m_activity.setProgressBarVisibility(false);
|
||||||
|
m_activity.m_pullToRefreshAttacher.setRefreshComplete();
|
||||||
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
try {
|
try {
|
||||||
@ -469,10 +470,6 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
|
|||||||
if (m_enableFeedIcons && !m_feedIconsChecked && Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()))
|
if (m_enableFeedIcons && !m_feedIconsChecked && Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()))
|
||||||
getFeedIcons();
|
getFeedIcons();
|
||||||
|
|
||||||
if (isAdded()) {
|
|
||||||
m_activity.m_pullToRefreshAttacher.setRefreshComplete();
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -409,7 +409,11 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
m_activity.setProgressBarVisibility(false);
|
m_activity.setProgressBarVisibility(false);
|
||||||
|
|
||||||
super.onPostExecute(result);
|
super.onPostExecute(result);
|
||||||
|
|
||||||
|
if (isAdded()) {
|
||||||
|
m_activity.m_pullToRefreshAttacher.setRefreshComplete();
|
||||||
|
}
|
||||||
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
m_refreshInProgress = false;
|
m_refreshInProgress = false;
|
||||||
|
|
||||||
@ -419,10 +423,6 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
|
|||||||
m_adapter.notifyDataSetChanged();
|
m_adapter.notifyDataSetChanged();
|
||||||
m_listener.onHeadlinesLoaded(fappend);
|
m_listener.onHeadlinesLoaded(fappend);
|
||||||
|
|
||||||
if (isAdded()) {
|
|
||||||
m_activity.m_pullToRefreshAttacher.setRefreshComplete();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (m_lastError == ApiError.LOGIN_FAILED) {
|
if (m_lastError == ApiError.LOGIN_FAILED) {
|
||||||
m_activity.login();
|
m_activity.login();
|
||||||
|
Loading…
Reference in New Issue
Block a user