From 325a8be484f3977b13994f7b30e5dc83e9c6d365 Mon Sep 17 00:00:00 2001 From: Zakhar Timoshenko Date: Sun, 18 Feb 2024 23:56:19 +0300 Subject: [PATCH] Fix wrong sources count if NSFW sources are disabled --- .../org/koitharu/kotatsu/explore/data/MangaSourcesRepository.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/explore/data/MangaSourcesRepository.kt b/app/src/main/kotlin/org/koitharu/kotatsu/explore/data/MangaSourcesRepository.kt index 6ec61efcd..884689c9a 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/explore/data/MangaSourcesRepository.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/explore/data/MangaSourcesRepository.kt @@ -57,7 +57,7 @@ class MangaSourcesRepository @Inject constructor( observeIsNsfwDisabled(), dao.observeEnabled(SourcesSortOrder.MANUAL), ) { skipNsfw, sources -> - sources.count { skipNsfw || !MangaSource(it.source).isNsfw() } + sources.count { !skipNsfw || !MangaSource(it.source).isNsfw() } }.distinctUntilChanged() }