Merge pull request #441 from vincode-io/issue-290
Don’t show author name if it’s the same as the feed name. Issue #290
This commit is contained in:
commit
a062759126
|
@ -400,7 +400,16 @@ class ArticleRenderer {
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
var byline = ""
|
// 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
|
var isFirstAuthor = true
|
||||||
|
|
||||||
for author in authors {
|
for author in authors {
|
||||||
|
@ -430,8 +439,8 @@ class ArticleRenderer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return byline
|
return byline
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private func renderedHTML() -> String {
|
private func renderedHTML() -> String {
|
||||||
|
|
Loading…
Reference in New Issue