diff --git a/Tusker.xcodeproj/project.pbxproj b/Tusker.xcodeproj/project.pbxproj index a899901c44..3ed8f345ec 100644 --- a/Tusker.xcodeproj/project.pbxproj +++ b/Tusker.xcodeproj/project.pbxproj @@ -2968,7 +2968,7 @@ repositoryURL = "https://git.shadowfacts.net/shadowfacts/HTMLStreamer.git"; requirement = { kind = exactVersion; - version = 0.1.3; + version = 0.2.0; }; }; D63CC700290EC0B8000E19DE /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = { diff --git a/Tusker/Activities/StatusActivityItemSource.swift b/Tusker/Activities/StatusActivityItemSource.swift index 4255295cbf..3ef30b349e 100644 --- a/Tusker/Activities/StatusActivityItemSource.swift +++ b/Tusker/Activities/StatusActivityItemSource.swift @@ -33,7 +33,7 @@ class StatusActivityItemSource: NSObject, UIActivityItemSource { let metadata = LPLinkMetadata() metadata.originalURL = status.url! metadata.url = status.url! - var converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) + let converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) let content = converter.convert(html: status.content) metadata.title = "\(status.account.displayName): \"\(content)\"" if let avatar = status.account.avatar, diff --git a/Tusker/Screens/Explore/TrendingLinkCardCollectionViewCell.swift b/Tusker/Screens/Explore/TrendingLinkCardCollectionViewCell.swift index d8ab71fc05..3d2c22d35c 100644 --- a/Tusker/Screens/Explore/TrendingLinkCardCollectionViewCell.swift +++ b/Tusker/Screens/Explore/TrendingLinkCardCollectionViewCell.swift @@ -79,7 +79,7 @@ class TrendingLinkCardCollectionViewCell: UICollectionViewCell { let provider = card.providerName!.trimmingCharacters(in: .whitespacesAndNewlines) providerLabel.text = provider - var converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) + let converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) descriptionLabel.text = converter.convert(html: card.description) descriptionLabel.isHidden = description.isEmpty diff --git a/Tusker/Screens/Notifications/ActionNotificationGroupCollectionViewCell.swift b/Tusker/Screens/Notifications/ActionNotificationGroupCollectionViewCell.swift index a261dfe514..3573114cbe 100644 --- a/Tusker/Screens/Notifications/ActionNotificationGroupCollectionViewCell.swift +++ b/Tusker/Screens/Notifications/ActionNotificationGroupCollectionViewCell.swift @@ -161,7 +161,7 @@ class ActionNotificationGroupCollectionViewCell: UICollectionViewListCell { actionLabel.setEmojis(pairs: people.map { ($0.displayOrUserName, $0.emojis) }, identifier: group.id) - var converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) + let converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) statusContentLabel.text = converter.convert(html: status.content) } diff --git a/Tusker/Screens/Notifications/PollFinishedNotificationCollectionViewCell.swift b/Tusker/Screens/Notifications/PollFinishedNotificationCollectionViewCell.swift index a4fabca4a6..f21b360344 100644 --- a/Tusker/Screens/Notifications/PollFinishedNotificationCollectionViewCell.swift +++ b/Tusker/Screens/Notifications/PollFinishedNotificationCollectionViewCell.swift @@ -124,7 +124,7 @@ class PollFinishedNotificationCollectionViewCell: UICollectionViewListCell { updateTimestamp() updateDisplayName(account: account) - var converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) + let converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) contentLabel.text = converter.convert(html: status.content) pollView.mastodonController = mastodonController diff --git a/Tusker/Screens/Notifications/StatusUpdatedNotificationCollectionViewCell.swift b/Tusker/Screens/Notifications/StatusUpdatedNotificationCollectionViewCell.swift index ccc886287d..70849dde69 100644 --- a/Tusker/Screens/Notifications/StatusUpdatedNotificationCollectionViewCell.swift +++ b/Tusker/Screens/Notifications/StatusUpdatedNotificationCollectionViewCell.swift @@ -120,7 +120,7 @@ class StatusUpdatedNotificationCollectionViewCell: UICollectionViewListCell { updateTimestamp() updateDisplayName(account: account) - var converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) + let converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) contentLabel.text = converter.convert(html: status.content) } diff --git a/Tusker/Views/Account Cell/AccountCollectionViewCell.swift b/Tusker/Views/Account Cell/AccountCollectionViewCell.swift index f7cede798a..128fa63a84 100644 --- a/Tusker/Views/Account Cell/AccountCollectionViewCell.swift +++ b/Tusker/Views/Account Cell/AccountCollectionViewCell.swift @@ -134,7 +134,7 @@ class AccountCollectionViewCell: UICollectionViewListCell { displayNameLabel.setEmojis(account.emojis, identifier: account.id) } - var converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) + let converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) noteLabel.text = converter.convert(html: account.note) noteLabel.setEmojis(account.emojis, identifier: account.id) } diff --git a/Tusker/Views/Status/StatusCardView.swift b/Tusker/Views/Status/StatusCardView.swift index 6e9723d476..51613381ba 100644 --- a/Tusker/Views/Status/StatusCardView.swift +++ b/Tusker/Views/Status/StatusCardView.swift @@ -198,7 +198,7 @@ class StatusCardView: UIView { titleLabel.text = title titleLabel.isHidden = title.isEmpty - var converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) + let converter = TextConverter(configuration: .init(insertNewlines: false), callbacks: HTMLConverter.Callbacks.self) let description = converter.convert(html: card.description) descriptionLabel.text = description descriptionLabel.isHidden = description.isEmpty