From 2b1c30f282657581c572b429585ebf9f93110236 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Tue, 10 Dec 2024 19:28:32 +0100 Subject: [PATCH] Fix up to date message getting filtered out when no other updates from source --- .../dev/dediamondpro/resourcify/gui/update/UpdateGui.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/dev/dediamondpro/resourcify/gui/update/UpdateGui.kt b/src/main/kotlin/dev/dediamondpro/resourcify/gui/update/UpdateGui.kt index 2518e32..877b487 100644 --- a/src/main/kotlin/dev/dediamondpro/resourcify/gui/update/UpdateGui.kt +++ b/src/main/kotlin/dev/dediamondpro/resourcify/gui/update/UpdateGui.kt @@ -196,10 +196,11 @@ class UpdateGui(val type: ProjectType, private val folder: File) : PaginatedScre for (service in ServiceRegistry.getAllServices()) { val future = service.getUpdates(files, type).thenApply { updates -> val ids = updates.values.filterNotNull().map { it.getProjectId() } - if (ids.isEmpty()) { - return@thenApply emptyMap() + val projects = if (ids.isEmpty()) { + emptyMap() + } else { + service.getProjectsFromIds(ids) } - val projects = service.getProjectsFromIds(ids) // Add project into map return@thenApply updates.filter { it.value == null || projects.containsKey(it.value!!.getProjectId()) } .map {