diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/reader/ReaderPresenter.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/reader/ReaderPresenter.kt index 71a300ebd..397c44834 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/reader/ReaderPresenter.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/reader/ReaderPresenter.kt @@ -119,12 +119,13 @@ class ReaderPresenter( val htmlContent = if (content.isNotBlank()) { - // If the content parsed by readability is not an HTML, it will return - // null. In that scenario we simply pass the original content - extractArticleHtmlContent(postLink, content) ?: content - } else { - null - } + // If the content parsed by readability is not an HTML, it will return + // null. In that scenario we simply pass the original content + extractArticleHtmlContent(postLink, content) ?: content + } else { + null + } + .orEmpty() _state.update { it.copy( diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/reader/ReaderState.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/reader/ReaderState.kt index 468b06ab5..fa0f7114d 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/reader/ReaderState.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/reader/ReaderState.kt @@ -31,10 +31,7 @@ internal data class ReaderState( val hasContent: Boolean get() = - !content.isNullOrBlank() && - feed != null && - !publishedAt.isNullOrBlank() && - !title.isNullOrBlank() + content != null && feed != null && !publishedAt.isNullOrBlank() && !title.isNullOrBlank() companion object {