mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-03 10:47:21 +00:00
✨ Notification manager for iOS
This commit is contained in:
3 files changed
+67
No files matched your search
@@ -856,6 +856,8 @@ extension MainFeedCollectionViewController: UIContextMenuInteractionDelegate {
|
||||
var menuElements = [UIMenuElement]()
|
||||
menuElements.append(UIMenu(title: "", options: .displayInline, children: [self.getAccountInfoAction(account: account)]))
|
||||
|
||||
menuElements.append(UIMenu(title: "", options: .displayInline, children: [self.getAccountNotificationsAction(account: account)]))
|
||||
|
||||
if let markAllAction = self.markAllAsReadAction(account: account, contentView: interaction.view) {
|
||||
menuElements.append(UIMenu(title: "", options: .displayInline, children: [markAllAction]))
|
||||
}
|
||||
@@ -1101,6 +1103,14 @@ extension MainFeedCollectionViewController {
|
||||
}
|
||||
return action
|
||||
}
|
||||
|
||||
func getAccountNotificationsAction(account: Account) -> UIAction {
|
||||
let title = NSLocalizedString("Notifications", comment: "Notifications")
|
||||
let action = UIAction(title: title, image: UIImage(systemName: "bell.badge")) { [weak self] _ in
|
||||
self?.coordinator.showNotificationInspector(for: account)
|
||||
}
|
||||
return action
|
||||
}
|
||||
|
||||
func deactivateAccountAction(account: Account) -> UIAction {
|
||||
let title = NSLocalizedString("Deactivate", comment: "Deactivate")
|
||||
|
||||
Reference in new issue
Block a user