From 938520d0607dd3a6bcb485886c70403e5490ccaf Mon Sep 17 00:00:00 2001 From: CMK Date: Mon, 12 Jul 2021 20:00:50 +0800 Subject: [PATCH] chore: remove ASDK compile warning --- .../Protocol/StatusProvider/StatusProviderFacade.swift | 6 +++--- Mastodon/Scene/Share/View/Node/Status/StatusNode.swift | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Mastodon/Protocol/StatusProvider/StatusProviderFacade.swift b/Mastodon/Protocol/StatusProvider/StatusProviderFacade.swift index e732789e..73952c8c 100644 --- a/Mastodon/Protocol/StatusProvider/StatusProviderFacade.swift +++ b/Mastodon/Protocol/StatusProvider/StatusProviderFacade.swift @@ -188,8 +188,8 @@ extension StatusProviderFacade { static func responseToStatusActiveLabelAction(provider: StatusProvider, node: ASCellNode, didSelectActiveEntityType type: ActiveEntityType) { switch type { case .hashtag(let text, _): - let hashtagTimelienViewModel = HashtagTimelineViewModel(context: provider.context, hashtag: text) - provider.coordinator.present(scene: .hashtagTimeline(viewModel: hashtagTimelienViewModel), from: provider, transition: .show) + let hashtagTimelineViewModel = HashtagTimelineViewModel(context: provider.context, hashtag: text) + provider.coordinator.present(scene: .hashtagTimeline(viewModel: hashtagTimelineViewModel), from: provider, transition: .show) case .mention(let text, _): coordinateToStatusMentionProfileScene(for: .primary, provider: provider, node: node, mention: text) case .url(_, _, let url, _): @@ -212,7 +212,7 @@ extension StatusProviderFacade { private static func coordinateToStatusMentionProfileScene(for target: Target, provider: StatusProvider, node: ASCellNode, mention: String) { guard let status = provider.status(node: node, indexPath: nil) else { return } - coordinateToStatusMentionProfileScene(for: target, provider: provider, status: status, mention: mention) + coordinateToStatusMentionProfileScene(for: target, provider: provider, status: status, mention: mention, href: nil) } #endif diff --git a/Mastodon/Scene/Share/View/Node/Status/StatusNode.swift b/Mastodon/Scene/Share/View/Node/Status/StatusNode.swift index 874836fa..9e62fd74 100644 --- a/Mastodon/Scene/Share/View/Node/Status/StatusNode.swift +++ b/Mastodon/Scene/Share/View/Node/Status/StatusNode.swift @@ -192,7 +192,10 @@ final class StatusNode: ASCellNode { } verticalStack.children = verticalStackChildren - return verticalStack + return ASInsetLayoutSpec( + insets: UIEdgeInsets(top: 12, left: 16, bottom: 12, right: 16), + child: verticalStack + ) } } @@ -230,7 +233,7 @@ extension StatusNode: ASMultiplexImageNodeDataSource { case "url" as NSString: return meta.url case "previewURL" as NSString: - return meta.priviewURL + return meta.previewURL default: assertionFailure() return nil