summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-06-23 17:11:41 +0400
committerAndrew Dolgov <[email protected]>2012-06-23 17:11:41 +0400
commit58f56c59ae2c49adf93cb5835c564f9e98bd2ebd (patch)
tree2c3972847d72133520b761fe7e00a5c175574258
parentba7068a5171c1eb1b8f737a8498e19fc3f829eb4 (diff)
actionbar navigation fixes
-rw-r--r--src/org/fox/ttrss/MainActivity.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java
index bbf130ae..ef9df900 100644
--- a/src/org/fox/ttrss/MainActivity.java
+++ b/src/org/fox/ttrss/MainActivity.java
@@ -183,7 +183,6 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
@Override
public void onItemSelected() {
- m_activeFeed = null;
m_selectedArticle = null;
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
@@ -196,6 +195,20 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
Fragment af = getSupportFragmentManager().findFragmentByTag(FRAG_ARTICLE);
if (af != null) ft.remove(af);
+ if (m_activeFeed.is_cat) {
+ FeedCategoriesFragment cats = (FeedCategoriesFragment) getSupportFragmentManager().findFragmentByTag(FRAG_CATS);
+
+ ft.show(cats);
+
+ cats.setSelectedCategory(null);
+ } else {
+ FeedsFragment feeds = (FeedsFragment) getSupportFragmentManager().findFragmentByTag(FRAG_FEEDS);
+
+ ft.show(feeds);
+
+ feeds.setSelectedFeed(null);
+ }
+
} else {
findViewById(R.id.article_fragment).setVisibility(View.GONE);
@@ -203,7 +216,9 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
}
ft.commit();
- viewCategory(m_category, m_prefs.getBoolean("browse_cats_like_feeds", false));
+ m_activeFeed = null;
+ refresh();
+ initMainMenu();
}
}