From ea6edaecc4caa8e930df14078ed9abc1d90f8ece Mon Sep 17 00:00:00 2001 From: Mitchell Syer Date: Sat, 17 Feb 2024 11:23:53 -0500 Subject: [PATCH] Fix local source being accidentally removed (#874) --- .../tachidesk/manga/impl/util/source/GetCatalogueSource.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/source/GetCatalogueSource.kt b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/source/GetCatalogueSource.kt index f3843e048..aefa43797 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/source/GetCatalogueSource.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/manga/impl/util/source/GetCatalogueSource.kt @@ -83,6 +83,8 @@ object GetCatalogueSource { } fun unregisterAllCatalogueSources() { - sourceCache.clear() + (sourceCache - 0L).forEach { (id, _) -> + sourceCache.remove(id) + } } }