Bug 930589 - Hide "Edit" context menu item for reading list items. r=sriram
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Mon, 04 Nov 2013 14:38:59 -0800
changeset 153499 af76477c0003f3b815e2ef98a51902a65348c4d9
parent 153498 c800ad2e84d2384287217377c7ed3a922b1f3caf
child 153500 4e7de85bedc2c2a6c3b36f1f3724b47fcf4028f1
push id35816
push userkwierso@gmail.com
push dateTue, 05 Nov 2013 05:22:53 +0000
treeherdermozilla-inbound@442b47e9fb80 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssriram
bugs930589
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 930589 - Hide "Edit" context menu item for reading list items. r=sriram
mobile/android/base/home/HomeFragment.java
--- a/mobile/android/base/home/HomeFragment.java
+++ b/mobile/android/base/home/HomeFragment.java
@@ -79,18 +79,19 @@ abstract class HomeFragment extends Frag
             return;
         }
 
         MenuInflater inflater = new MenuInflater(view.getContext());
         inflater.inflate(R.menu.home_contextmenu, menu);
 
         menu.setHeaderTitle(info.getDisplayTitle());
 
-        // Hide the "Edit" menuitem if this item isn't a bookmark.
-        if (info.bookmarkId < 0) {
+        // Hide the "Edit" menuitem if this item isn't a bookmark,
+        // or if this is a reading list item.
+        if (info.bookmarkId < 0 || info.inReadingList) {
             menu.findItem(R.id.home_edit_bookmark).setVisible(false);
         }
 
         // Hide the "Remove" menuitem if this item doesn't have a bookmark or history ID.
         if (info.bookmarkId < 0 && info.historyId < 0) {
             menu.findItem(R.id.home_remove).setVisible(false);
         }