diff --git a/Yep/Services/YepService.swift b/Yep/Services/YepService.swift index baf4b958..eb118529 100644 --- a/Yep/Services/YepService.swift +++ b/Yep/Services/YepService.swift @@ -2968,7 +2968,7 @@ struct DiscoveredFeed: Hashable { let description: String let thumbnailImageURLString: String - static func URLInfo(json: JSONDictionary) -> URLInfo? { + static func fromJSONDictionary(json: JSONDictionary) -> URLInfo? { guard let URLString = json["url"] as? String, URL = NSURL(string: URLString), diff --git a/Yep/ViewControllers/Feeds/FeedsViewController.swift b/Yep/ViewControllers/Feeds/FeedsViewController.swift index b89b3486..7e1b1a6f 100644 --- a/Yep/ViewControllers/Feeds/FeedsViewController.swift +++ b/Yep/ViewControllers/Feeds/FeedsViewController.swift @@ -1076,6 +1076,10 @@ extension FeedsViewController: UITableViewDataSource, UITableViewDelegate { cell.configureWithFeed(feed, layoutCache: layoutCache, needShowSkill: needShowSkill) + case .URL: + + cell.configureWithFeed(feed, layoutCache: layoutCache, needShowSkill: needShowSkill) + case .Image: let tapMediaAction: FeedTapMediaAction = { [weak self] transitionView, image, attachments, index in diff --git a/Yep/Views/Cells/Feed/FeedCellLayout.swift b/Yep/Views/Cells/Feed/FeedCellLayout.swift index 2b1bbceb..0d07fdd3 100644 --- a/Yep/Views/Cells/Feed/FeedCellLayout.swift +++ b/Yep/Views/Cells/Feed/FeedCellLayout.swift @@ -111,6 +111,11 @@ struct FeedCellLayout { } var locationLayout: LocationLayout? + struct URLLayout { + let URLContainerViewFrame: CGRect + } + var _URLLayout: URLLayout? + // MARK: - Init init(height: CGFloat, basicLayout: BasicLayout) { @@ -217,6 +222,15 @@ struct FeedCellLayout { case .Text: break + + case .URL: + + let height: CGFloat = leftBottomLabelFrame.origin.y - beginY - 15 + let URLContainerViewFrame = CGRect(x: 65, y: beginY, width: screenWidth - 65 - 60, height: height) + + let _URLLayout = FeedCellLayout.URLLayout(URLContainerViewFrame: URLContainerViewFrame) + + self._URLLayout = _URLLayout case .Image: