From c7f6c3b6a3ed5493add65a53ac40ef39a79f7078 Mon Sep 17 00:00:00 2001 From: R-Sandor <45048465+R-Sandor@users.noreply.github.com> Date: Mon, 18 Nov 2024 06:26:21 -0500 Subject: [PATCH] Use the sorted tags --- .../main/java/dev/findfirst/core/service/BookmarkService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/main/java/dev/findfirst/core/service/BookmarkService.java b/server/src/main/java/dev/findfirst/core/service/BookmarkService.java index dfef2495..1f0afead 100644 --- a/server/src/main/java/dev/findfirst/core/service/BookmarkService.java +++ b/server/src/main/java/dev/findfirst/core/service/BookmarkService.java @@ -193,10 +193,10 @@ public String export() { var uniqueBkmksWithTag = new ArrayList(); // Sort by the largest tags set. - tags.stream().sorted((rTag, lTag) -> rTag.bookmarks().size() - lTag.bookmarks().size()).toList(); + var sorted = tags.stream().sorted((rTag, lTag) -> rTag.bookmarks().size() - lTag.bookmarks().size()).toList(); // streams the sorted list - tags.stream().forEach(t -> { + sorted.stream().forEach(t -> { var uniques = new ArrayList(); addUniqueBookmarks(t, uniques, foundMap, uniqueBkmksWithTag); });