From 9aaeacc16f1abe41f644cec17d0ef1a7389f3245 Mon Sep 17 00:00:00 2001 From: DreVla Date: Mon, 22 Jan 2024 11:58:16 +0200 Subject: [PATCH] Bug 1861744 - Don't display pending to delete bookmarks when refresh When deleting bookmarks, we do not instantly remove them due to having the possibility of undoing the deletion. Because of this, when the bookmarks are pending to delete, they can still be displayed when pulling down to refresh and then acted on. This patch aims to fix this issue by subtracting the pending to delete bookmarks when they are refreshed by pulling down. --- .../java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt index 2108dc143e..4664675890 100644 --- a/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt @@ -281,6 +281,7 @@ class BookmarkFragment : LibraryPageFragment(), UserInteractionHan context?.let { requireContext().bookmarkStorage .getTree(guid, recursive) + ?.minus(pendingBookmarksToDelete) ?.let { desktopFolders.withOptionalDesktopFolders(it) } } }