adds "Mark All Read" shortcut for feeds list

This commit is contained in:
Rizwan Mohamed Ibrahim 2020-05-14 18:13:41 +05:30
parent 8500324eb2
commit 04458adee5
No known key found for this signature in database
GPG Key ID: D5BEE468D448BCC5
1 changed files with 12 additions and 1 deletions

View File

@ -459,6 +459,17 @@ class MasterFeedViewController: UITableViewController, UndoableCommandRunner {
} }
} }
@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 // MARK: API
func restoreSelectionIfNecessary(adjustScroll: Bool) { func restoreSelectionIfNecessary(adjustScroll: Bool) {