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

View File

@ -169,6 +169,7 @@ public class ArticlePager extends Fragment {
} catch (BadParcelableException e) { } catch (BadParcelableException e) {
if (getActivity() != null) { if (getActivity() != null) {
getActivity().finish(); 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)) { if (m_articles.size() == 0 || !m_feed.equals(GlobalState.getInstance().m_activeFeed)) {
refresh(false); if (m_activity.getSupportFragmentManager().findFragmentByTag(CommonActivity.FRAG_ARTICLE) == null) {
GlobalState.getInstance().m_activeFeed = m_feed; refresh(false);
GlobalState.getInstance().m_activeFeed = m_feed;
}
} else { } else {
notifyUpdated(); notifyUpdated();
} }