Bug 1234967 - Delete only desired bookmark from the Bookmarks context menu r?rnewman draft
authorAndrzej Hunt <andrzej@ahunt.org>
Tue, 29 Mar 2016 11:22:18 -0700
changeset 347699 3b700346c0288e7cbf309845bc3bba5d56474cab
parent 347698 f4f24c0ddb09b17714f5a7ff86c6c03ad793462d
child 347700 512f9dae8a28fbc338c66d1f0448ffc7a977ca8c
push id14647
push userbmo:ahunt@mozilla.com
push dateTue, 05 Apr 2016 18:15:38 +0000
reviewersrnewman
bugs1234967
milestone48.0a1
Bug 1234967 - Delete only desired bookmark from the Bookmarks context menu r?rnewman Previously we would delete all bookmarks with a given URL. It is possible to have multiple bookmarks for any given URL - this is most likely to happen when manually manipulating bookmarks on desktop (mobile doesn't allow creating more than one bookmark per URL per folder, and doesn't allow moving bookmarks, hence this can only happen with sync enabled). MozReview-Commit-ID: Ke9uDjg20sM
mobile/android/base/java/org/mozilla/gecko/home/HomeFragment.java
--- a/mobile/android/base/java/org/mozilla/gecko/home/HomeFragment.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/HomeFragment.java
@@ -395,17 +395,17 @@ public abstract class HomeFragment exten
                 if (mDB.hideSuggestedSite(mInfo.url)) {
                     cr.notifyChange(SuggestedSites.CONTENT_URI, null);
                 }
             }
 
             switch(mInfo.itemType) {
                 case BOOKMARKS:
                     Telemetry.sendUIEvent(TelemetryContract.Event.UNSAVE, TelemetryContract.Method.CONTEXT_MENU, "bookmark");
-                    mDB.removeBookmarksWithURL(cr, mInfo.url);
+                    mDB.removeBookmarkWithID(cr, mInfo.bookmarkId);
                     break;
 
                 case HISTORY:
                     mDB.removeHistoryEntry(cr, mInfo.url);
                     break;
 
                 case READING_LIST:
                     Telemetry.sendUIEvent(TelemetryContract.Event.UNSAVE, TelemetryContract.Method.CONTEXT_MENU, "reading_list");