From 8af33e3d7c85b2da8d72a07ce8837d33bb933585 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 22 Jun 2012 18:14:49 +0400 Subject: [PATCH] offline: properly deselect current category when closing headlines --- src/org/fox/ttrss/offline/OfflineActivity.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/org/fox/ttrss/offline/OfflineActivity.java b/src/org/fox/ttrss/offline/OfflineActivity.java index 3164b493..b6070355 100644 --- a/src/org/fox/ttrss/offline/OfflineActivity.java +++ b/src/org/fox/ttrss/offline/OfflineActivity.java @@ -333,12 +333,19 @@ public class OfflineActivity extends FragmentActivity implements OfflineFeedsFragment ff = (OfflineFeedsFragment) getSupportFragmentManager() .findFragmentByTag(FRAG_FEEDS); + OfflineFeedCategoriesFragment cf = (OfflineFeedCategoriesFragment) getSupportFragmentManager() + .findFragmentByTag(FRAG_CATS); + FragmentTransaction ft = getSupportFragmentManager().beginTransaction(); ft.replace(R.id.headlines_fragment, new DummyFragment(), ""); ft.commit(); if (ff != null) { - ff.setSelectedFeedId(-1); + ff.setSelectedFeedId(0); + } + + if (cf != null) { + cf.setSelectedFeedId(-1); } refreshViews(); @@ -814,7 +821,7 @@ public class OfflineActivity extends FragmentActivity implements if (!m_smallScreenMode) { getActionBar().setDisplayHomeAsUpEnabled(m_selectedArticleId != 0); } else { - getActionBar().setDisplayHomeAsUpEnabled(m_selectedArticleId != 0 || m_activeFeedId != 0); + getActionBar().setDisplayHomeAsUpEnabled(m_selectedArticleId != 0 || m_activeFeedId != 0 || m_activeCatId != -1); } } } @@ -1288,7 +1295,7 @@ public class OfflineActivity extends FragmentActivity implements ft.replace(R.id.feeds_fragment, new OfflineFeedCategoriesFragment(), FRAG_CATS); } ft.commit(); - + initMainMenu(); refreshViews();