From 6c0e2e2b90928db82940c4859351ef7d848c9b43 Mon Sep 17 00:00:00 2001 From: vianh Date: Thu, 15 Feb 2024 22:36:16 +0700 Subject: [PATCH] Fix mirror domain switching --- .../org/koitharu/kotatsu/core/parser/RemoteMangaRepository.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/core/parser/RemoteMangaRepository.kt b/app/src/main/kotlin/org/koitharu/kotatsu/core/parser/RemoteMangaRepository.kt index 09c9c3114..9c87abc88 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/core/parser/RemoteMangaRepository.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/core/parser/RemoteMangaRepository.kt @@ -227,6 +227,5 @@ class RemoteMangaRepository( } } - private fun Result<*>.isValidResult() = exceptionOrNull() !is ParseException - && (getOrNull() as? Collection<*>)?.isEmpty() != true + private fun Result<*>.isValidResult() = isSuccess && (getOrNull() as? Collection<*>)?.isEmpty() != true }