diff --git a/iOS/MasterFeed/MasterFeedViewController.swift b/iOS/MasterFeed/MasterFeedViewController.swift index accf4b67e..651afc6c2 100644 --- a/iOS/MasterFeed/MasterFeedViewController.swift +++ b/iOS/MasterFeed/MasterFeedViewController.swift @@ -458,7 +458,18 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner { self.reloadAllVisibleCells() } } - + + @objc func markAllAsRead(_ sender: Any) { + guard let indexPath = tableView.indexPathForSelectedRow, let contentView = tableView.cellForRow(at: indexPath)?.contentView else { + return + } + + let title = NSLocalizedString("Mark All as Read", comment: "Mark All as Read") + MarkAsReadAlertController.confirm(self, coordinator: coordinator, confirmTitle: title, sourceType: contentView) { [weak self] in + self?.coordinator.markAllAsReadInTimeline() + } + } + // MARK: API func restoreSelectionIfNecessary(adjustScroll: Bool) {