fix dual refresh race condition when doing openFeedArticles() in tablet

mode
This commit is contained in:
Andrew Dolgov 2013-02-11 22:06:40 +04:00
parent 0d4bd2f446
commit da36af7b42
3 changed files with 7 additions and 4 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="134"
android:versionName="1.12" >
android:versionCode="135"
android:versionName="1.13" >
<uses-sdk
android:minSdkVersion="8"

View File

@ -169,6 +169,7 @@ public class ArticlePager extends Fragment {
} catch (BadParcelableException e) {
if (getActivity() != null) {
getActivity().finish();
return;
}
}

View File

@ -291,8 +291,10 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
}
if (m_articles.size() == 0 || !m_feed.equals(GlobalState.getInstance().m_activeFeed)) {
refresh(false);
GlobalState.getInstance().m_activeFeed = m_feed;
if (m_activity.getSupportFragmentManager().findFragmentByTag(CommonActivity.FRAG_ARTICLE) == null) {
refresh(false);
GlobalState.getInstance().m_activeFeed = m_feed;
}
} else {
notifyUpdated();
}