Skip to content

Commit

Permalink
Display URL if title and summary are empty (#839)
Browse files Browse the repository at this point in the history
In the worst case scenario, display the article's
URL to give context about an article if both the article's
title and summary are missing.
  • Loading branch information
jocmp authored Feb 8, 2025
1 parent 6e0fb5f commit 56ad0ed
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,13 @@ internal fun listMapper(
url = url,
feedTitle = feedTitle,
imageURL = imageURL,
summary = summary ?: "",
summary = if (!summary.isNullOrBlank()) {
summary
} else if (title.isNullOrBlank()) {
url.orEmpty()
} else {
""
},
updatedAt = updatedAt,
read = read ?: false,
starred = starred ?: false,
Expand Down

0 comments on commit 56ad0ed

Please sign in to comment.