Bug 1234967 - Delete only desired bookmark from the Bookmarks context menu
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).
Rebased by Tom Klein.
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
@@ -445,17 +445,17 @@ public abstract class HomeFragment exten
final String extra;
if (isReaderViewPage) {
extra = "bookmark_reader";
} else {
extra = "bookmark";
}
Telemetry.sendUIEvent(TelemetryContract.Event.UNSAVE, TelemetryContract.Method.CONTEXT_MENU, extra);
- mDB.removeBookmarksWithURL(cr, mInfo.url);
+ mDB.removeBookmarkWithID(cr, mInfo.bookmarkId);
if (isReaderViewPage) {
ReadingListHelper.removeCachedReaderItem(mInfo.url, mContext);
}
}
private void removeHistory(ContentResolver cr) {
mDB.removeHistoryEntry(cr, mInfo.url);