fix crash in sortfeeds/sortcats when adapter is already destroyed
This commit is contained in:
parent
83fa1ace29
commit
fb7792125b
@ -317,7 +317,11 @@ public class FeedCategoriesFragment extends Fragment implements OnItemClickListe
|
|||||||
}
|
}
|
||||||
|
|
||||||
Collections.sort(m_cats, cmp);
|
Collections.sort(m_cats, cmp);
|
||||||
|
try {
|
||||||
m_adapter.notifyDataSetInvalidated();
|
m_adapter.notifyDataSetInvalidated();
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
// adapter missing
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -546,7 +546,12 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
|
|||||||
}
|
}
|
||||||
|
|
||||||
Collections.sort(m_feeds, cmp);
|
Collections.sort(m_feeds, cmp);
|
||||||
|
|
||||||
|
try {
|
||||||
m_adapter.notifyDataSetInvalidated();
|
m_adapter.notifyDataSetInvalidated();
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
// adapter missing
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetIconsTask extends AsyncTask<FeedList, Integer, Integer> {
|
public class GetIconsTask extends AsyncTask<FeedList, Integer, Integer> {
|
||||||
|
Loading…
Reference in New Issue
Block a user