Don’t show author name if it’s the same as the feed name. Issue #290

This commit is contained in:
Maurice Parker 2018-09-06 17:09:11 -05:00
parent 48b859fbd2
commit 1b477a4e31
1 changed files with 11 additions and 2 deletions

View File

@ -400,6 +400,15 @@ class ArticleRenderer {
return ""
}
// If the author's name is the same as the feed, then we don't want to display it.
// This code assumes that multiple authors would never match the feed name so that
// if there feed owner has an article co-author all authors are given the byline.
if authors.count == 1, let author = authors.first {
if author.name == article.feed?.nameForDisplay {
return ""
}
}
var byline = ""
var isFirstAuthor = true
@ -430,8 +439,8 @@ class ArticleRenderer {
}
}
return byline
}
private func renderedHTML() -> String {