Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added better error handling when article has been cleared from cache #447

Merged
merged 4 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,7 @@ data class Article(
val link: String? = item?.link
val feedDisplayTitle: String = item?.feedDisplayTitle ?: ""
val title: String = item?.plainTitle ?: ""
val snippet: String = item?.plainSnippet ?: ""
val enclosure: Enclosure =
item?.enclosureLink?.let { link ->
Enclosure(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,15 @@ class ArticleViewModel(
}
} else {
Log.e(LOG_TAG, "No default file to parse")
textToDisplay.update { TextToDisplay.FAILED_MISSING_BODY }
LinearArticle(elements = emptyList())
textToDisplay.update { TextToDisplay.CONTENT }
htmlLinearizer.linearize(
"Sorry, due to a coding oversight, " +
"the full offline version of this article has been permanently deleted, " +
"see <a href=\"https://github.com/spacecowboy/Feeder/issues/443\">feeder#443</a> " +
"for updates on this issue<br/><br/>" +
article.snippet,
article.feedUrl ?: "",
)
}
}

Expand Down
Loading