From ae2e38acac2f74f2f479b990777c16f82063db80 Mon Sep 17 00:00:00 2001 From: Koitharu Date: Sun, 28 Jul 2024 14:55:25 +0300 Subject: [PATCH] Trim description --- .../koitharu/kotatsu/details/domain/DetailsLoadUseCase.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/details/domain/DetailsLoadUseCase.kt b/app/src/main/kotlin/org/koitharu/kotatsu/details/domain/DetailsLoadUseCase.kt index 837679389..32142b7f7 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/details/domain/DetailsLoadUseCase.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/details/domain/DetailsLoadUseCase.kt @@ -55,11 +55,11 @@ class DetailsLoadUseCase @Inject constructor( try { val details = getDetails(manga) launch { updateTracker(details) } - send(MangaDetails(details, local?.peek(), details.description?.parseAsHtml(withImages = false), false)) - send(MangaDetails(details, local?.await(), details.description?.parseAsHtml(withImages = true), true)) + send(MangaDetails(details, local?.peek(), details.description?.parseAsHtml(withImages = false)?.trim(), false)) + send(MangaDetails(details, local?.await(), details.description?.parseAsHtml(withImages = true)?.trim(), true)) } catch (e: IOException) { local?.await()?.manga?.also { localManga -> - send(MangaDetails(localManga, null, localManga.description?.parseAsHtml(withImages = false), true)) + send(MangaDetails(localManga, null, localManga.description?.parseAsHtml(withImages = false)?.trim(), true)) } ?: close(e) } }