ArticlePager: BadParcelable workaround
This commit is contained in:
parent
2e116fe2d9
commit
c99ea70d2d
@ -10,6 +10,7 @@ import org.fox.ttrss.util.HeadlinesRequest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.BadParcelableException;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.app.Fragment;
|
||||
@ -160,7 +161,13 @@ public class ArticlePager extends Fragment {
|
||||
super.onPostExecute(result);
|
||||
|
||||
if (result != null) {
|
||||
m_adapter.notifyDataSetChanged();
|
||||
try {
|
||||
m_adapter.notifyDataSetChanged();
|
||||
} catch (BadParcelableException e) {
|
||||
if (getActivity() != null) {
|
||||
getActivity().finish();
|
||||
}
|
||||
}
|
||||
|
||||
if (m_article.id == 0 || m_articles.indexOf(m_article) == -1) {
|
||||
if (m_articles.size() > 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user