diff options
author | Andrew Dolgov <[email protected]> | 2011-11-30 22:06:11 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-11-30 22:06:11 +0300 |
commit | 95f6ef2fa2ad9bcdef5a54c8a8724d7f70d7de2e (patch) | |
tree | 6782039a6b98c8da5b026d4e51402cf0e67d580b /src/org | |
parent | ec7f489c6d3399176a2c786ad511c7f2c5c53010 (diff) |
menu-related tweaks, drop duplicate set unread from headline context
menu
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/fox/ttrss/MainActivity.java | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/org/fox/ttrss/MainActivity.java b/src/org/fox/ttrss/MainActivity.java index aa6eaa8d..c5573c2b 100644 --- a/src/org/fox/ttrss/MainActivity.java +++ b/src/org/fox/ttrss/MainActivity.java @@ -693,6 +693,7 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe return true; */ default: + Log.d(TAG, "onOptionsItemSelected, unhandled id=" + item.getItemId()); return super.onOptionsItemSelected(item); } } @@ -1138,8 +1139,6 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe public boolean onContextItemSelected(MenuItem item) { AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo(); - Log.d(TAG, "onContextItemSelected=" + item.getItemId()); - HeadlinesFragment hf = (HeadlinesFragment)getSupportFragmentManager().findFragmentById(R.id.headlines_fragment); FeedsFragment ff = (FeedsFragment)getSupportFragmentManager().findFragmentById(R.id.feeds_fragment); FeedCategoriesFragment cf = (FeedCategoriesFragment)getSupportFragmentManager().findFragmentById(R.id.cats_fragment); @@ -1153,7 +1152,7 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe cf.setSelectedCategory(cat); } } - break; + return true; case R.id.browse_feeds: if (cf != null) { FeedCategory cat = cf.getCategoryAtPosition(info.position); @@ -1162,7 +1161,7 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe cf.setSelectedCategory(cat); } } - break; + return true; case R.id.catchup_category: if (cf != null) { FeedCategory cat = cf.getCategoryAtPosition(info.position); @@ -1170,7 +1169,7 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe catchupFeed(new Feed(cat.id, cat.title, true)); } } - break; + return true; case R.id.catchup_feed: if (ff != null) { Feed feed = ff.getFeedAtPosition(info.position); @@ -1178,7 +1177,7 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe catchupFeed(feed); } } - break; + return true; case R.id.selection_toggle_marked: if (hf != null) { ArticleList selected = hf.getSelectedArticles(); @@ -1245,8 +1244,17 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe if (article != null) shareArticle(article); } - break; - case R.id.set_unread: + return true; + case R.id.catchup_above: + if (hf != null) { + Article article = hf.getArticleAtPosition(info.position); + if (article != null) { + // TODO implement + + } + } + return true; + /* case R.id.set_unread: if (hf != null) { Article article = hf.getArticleAtPosition(info.position); if (article != null) { @@ -1254,10 +1262,11 @@ public class MainActivity extends FragmentActivity implements FeedsFragment.OnFe saveArticleUnread(article); } } - break; + break; */ + default: + Log.d(TAG, "onContextItemSelected, unhandled id=" + item.getItemId()); + return super.onContextItemSelected(item); } - - return true; } |