Bug 1234967 - Delete only desired bookmark from the Bookmarks context menu draft
authorAndrzej Hunt <andrzej@ahunt.org>
Tue, 29 Mar 2016 11:22:18 -0700
changeset 450175 f3dcdfe319b355f47f5944a7609ff593141eb560
parent 450174 5f6790be0c2c3454a28b48c5b5e219f76fef88f3
child 450176 e9cab14d0b4b318e1c1789a4c000fe8704319c85
push id38772
push userbmo:twointofive@gmail.com
push dateFri, 16 Dec 2016 03:01:04 +0000
bugs1234967
milestone53.0a1
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
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
@@ -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);