feed & cat fragments: do not try to refresh if not added

This commit is contained in:
Andrew Dolgov 2017-05-31 12:33:05 +03:00
parent 05dec34be2
commit 21816c331c
2 changed files with 4 additions and 0 deletions

View File

@ -275,6 +275,8 @@ public class FeedCategoriesFragment extends BaseFeedlistFragment implements OnIt
} */
public void refresh(boolean background) {
if (!isAdded()) return;
if (m_swipeLayout != null) m_swipeLayout.setRefreshing(true);
CatsRequest req = new CatsRequest(getActivity().getApplicationContext());

View File

@ -384,6 +384,8 @@ public class FeedsFragment extends BaseFeedlistFragment implements OnItemClickLi
@SuppressWarnings({ "serial" })
public void refresh(boolean background) {
if (!isAdded()) return;
//FeedCategory cat = m_onlineServices.getActiveCategory();
if (m_swipeLayout != null) m_swipeLayout.setRefreshing(true);