Shorten the max external URL length so that it is less likely to wrap on the iPhone at the default size

This commit is contained in:
Maurice Parker 2020-11-20 10:36:04 -06:00
parent 1c23f02803
commit 90c5ad8351
1 changed files with 2 additions and 2 deletions

View File

@ -155,8 +155,8 @@ private extension ArticleRenderer {
if let externalLink = article.externalURL, externalLink != article.preferredLink {
var displayLink = externalLink.strippingHTTPOrHTTPSScheme
if displayLink.count > 40 {
displayLink = displayLink.prefix(40).appending("...")
if displayLink.count > 27 {
displayLink = displayLink.prefix(27).appending("...")
}
let regarding = NSLocalizedString("Link", comment: "Link")
let externalLinkString = "\(regarding): <a href=\"\(externalLink)\">\(displayLink)</a>"