mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fixes context menu logic
Prevents both a menu and action being attached to the `markAllAsRead` button. This caused issues on iPad where the popover would show instead of the menu. When the user changes the preference the toolbar is now rebuilt. This commit also fixes the widget building on M1 where SwiftGen is available.
This commit is contained in:
@@ -477,6 +477,7 @@ class MasterTimelineViewController: UITableViewController, UndoableCommandRunner
|
||||
resetEstimatedRowHeight()
|
||||
reloadAllVisibleCells()
|
||||
}
|
||||
updateToolbar()
|
||||
}
|
||||
|
||||
@objc func contentSizeCategoryDidChange(_ note: Notification) {
|
||||
@@ -675,8 +676,8 @@ private extension MasterTimelineViewController {
|
||||
let settingsAction = UIAction(title: NSLocalizedString("Settings", comment: "Settings"), image: UIImage(systemName: "gear")!, discoverabilityTitle: NSLocalizedString("You can turn this confirmation off in Settings.", comment: "You can turn this confirmation off in Settings.")) { [weak self] action in
|
||||
self?.coordinator.showSettings(scrollToArticlesSection: true)
|
||||
}
|
||||
|
||||
markAllAsReadButton.menu = UIMenu(title: NSLocalizedString(title, comment: title), image: nil, identifier: nil, children: [settingsAction, markAsReadAction])
|
||||
markAllAsReadButton.action = nil
|
||||
} else {
|
||||
markAllAsReadButton.action = #selector(MasterTimelineViewController.markAllAsRead(_:))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user