ArticlePager: BadParcelable workaround

This commit is contained in:
Andrew Dolgov 2012-11-22 14:18:19 +03:00
parent 2e116fe2d9
commit c99ea70d2d

View File

@ -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) {
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) {