Merge pull request #2074 from rizwankce/fix/mark-all-read-shortcut-on-feed

"Mark All Read" shortcut for feeds list
This commit is contained in:
Maurice Parker 2020-05-14 09:52:31 -05:00 committed by GitHub
commit 49e51d489a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 1 deletions

View File

@ -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) {