diff --git a/src/org/fox/ttrss/FeedsFragment.java b/src/org/fox/ttrss/FeedsFragment.java index 797df018..07682586 100644 --- a/src/org/fox/ttrss/FeedsFragment.java +++ b/src/org/fox/ttrss/FeedsFragment.java @@ -550,4 +550,9 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh return null; } } + + public void setSelectedFeedId(int feedId) { + m_selectedFeedId = feedId; + } + } diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index 0b475946..84ade258 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -799,6 +799,7 @@ public class MainActivity extends FragmentActivity implements OnlineServices { .setVisibility(View.VISIBLE); findViewById(R.id.headlines_fragment).setVisibility( View.GONE); + refreshCategories(); } else { findViewById(R.id.feeds_fragment).setVisibility( @@ -808,6 +809,14 @@ public class MainActivity extends FragmentActivity implements OnlineServices { refreshFeeds(); } + + FeedsFragment ff = (FeedsFragment) getSupportFragmentManager() + .findFragmentById(R.id.feeds_fragment); + + if (ff != null) { + ff.setSelectedFeedId(0); + } + m_activeFeed = null; initMainMenu(); @@ -833,6 +842,13 @@ public class MainActivity extends FragmentActivity implements OnlineServices { findViewById(R.id.headlines_fragment).setVisibility( View.INVISIBLE); + FeedsFragment ff = (FeedsFragment) getSupportFragmentManager() + .findFragmentById(R.id.feeds_fragment); + + if (ff != null) { + ff.setSelectedFeedId(0); + } + m_activeFeed = null; refreshFeeds();