diff --git a/iOS/MasterTimeline/Cell/MasterTimelineCellLayout.swift b/iOS/MasterTimeline/Cell/MasterTimelineCellLayout.swift index 7615127dc..7539920cf 100644 --- a/iOS/MasterTimeline/Cell/MasterTimelineCellLayout.swift +++ b/iOS/MasterTimeline/Cell/MasterTimelineCellLayout.swift @@ -25,20 +25,27 @@ struct MasterTimelineCellLayout { static let avatarCornerRadius = CGFloat(integerLiteral: 4) static let titleColor = AppAssets.timelineTextPrimaryColor - static let titleFont = UIFont.preferredFont(forTextStyle: .headline) + static var titleFont: UIFont { + return UIFont.preferredFont(forTextStyle: .headline) + } static let titleBottomMargin = CGFloat(integerLiteral: 1) - static let feedColor = AppAssets.timelineTextSecondaryColor - static let feedNameFont = UIFont.preferredFont(forTextStyle: .footnote) + static var feedNameFont: UIFont { + return UIFont.preferredFont(forTextStyle: .footnote) + } static let feedRightMargin = CGFloat(integerLiteral: 8) static let dateColor = AppAssets.timelineTextSecondaryColor - static let dateFont = UIFont.preferredFont(forTextStyle: .footnote) + static var dateFont: UIFont { + return UIFont.preferredFont(forTextStyle: .footnote) + } static let dateMarginBottom = CGFloat(integerLiteral: 1) static let summaryColor = AppAssets.timelineTextPrimaryColor - static let summaryFont = UIFont.preferredFont(forTextStyle: .body) + static var summaryFont: UIFont { + return UIFont.preferredFont(forTextStyle: .body) + } static let chevronWidth = CGFloat(integerLiteral: 28) diff --git a/iOS/MasterTimeline/MasterTimelineViewController.swift b/iOS/MasterTimeline/MasterTimelineViewController.swift index 8896193e0..5a8f2421a 100644 --- a/iOS/MasterTimeline/MasterTimelineViewController.swift +++ b/iOS/MasterTimeline/MasterTimelineViewController.swift @@ -40,6 +40,7 @@ class MasterTimelineViewController: ProgressTableViewController, UndoableCommand NotificationCenter.default.addObserver(self, selector: #selector(articleDataDidChange(_:)), name: .ArticleDataDidChange, object: navState) NotificationCenter.default.addObserver(self, selector: #selector(articlesDidChange(_:)), name: .ArticlesDidChange, object: navState) NotificationCenter.default.addObserver(self, selector: #selector(articleSelectionDidChange(_:)), name: .ArticleSelectionDidChange, object: navState) + NotificationCenter.default.addObserver(self, selector: #selector(contentSizeCategoryDidChange), name: UIContentSizeCategory.didChangeNotification, object: nil) refreshControl = UIRefreshControl() refreshControl!.addTarget(self, action: #selector(refreshAccounts(_:)), for: .valueChanged) @@ -268,6 +269,10 @@ class MasterTimelineViewController: ProgressTableViewController, UndoableCommand } + @objc func contentSizeCategoryDidChange(_ note: Notification) { + tableView.reloadData() + } + // MARK: Reloading @objc func reloadAllVisibleCells() {