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
--- 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");