Bug 930589 - Hide "Edit" context menu item for reading list items. r=sriram, a=lsblakk
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Mon, 04 Nov 2013 14:38:59 -0800
changeset 286418 8a0c3982f7a1f18235b169935cf5c4889c97c956
parent 286417 216511295a98dd8c9586b29986b9786e4bc6cbf2
child 286419 ca693fb76f9b4b085f6cd25d5f6d067c47fc3b77
push id218
push userryanvm@gmail.com
push dateWed, 16 Dec 2015 22:58:33 +0000
reviewerssriram, lsblakk
bugs930589
milestone26.0
Bug 930589 - Hide "Edit" context menu item for reading list items. r=sriram, a=lsblakk
mobile/android/base/home/HomeFragment.java
--- a/mobile/android/base/home/HomeFragment.java
+++ b/mobile/android/base/home/HomeFragment.java
@@ -81,18 +81,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);
         }