mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 00:04:25 +00:00
Fix Mark All as Read confirmation popover appearing centered when triggered by keyboard shortcut. Fixes #5370.
This commit is contained in:
1 parent
e9a51d775d
commit
bf11af151d
1 file changed
+10
-1
@@ -85,7 +85,8 @@ final class RootSplitViewController: UISplitViewController {
|
||||
}
|
||||
let articlesToMark = coordinator.articles
|
||||
let title = NSLocalizedString("Mark All as Read", comment: "Command")
|
||||
MarkAsReadAlertController.confirm(self, coordinator: coordinator, confirmTitle: title, sourceType: view as UIView) { [weak self] in
|
||||
|
||||
let completion: () -> Void = { [weak self] in
|
||||
guard let self else {
|
||||
return
|
||||
}
|
||||
@@ -93,6 +94,14 @@ final class RootSplitViewController: UISplitViewController {
|
||||
self.coordinator.selectNextUnread()
|
||||
}
|
||||
}
|
||||
|
||||
// Anchor to the Mark All as Read button (keyboard shortcut has no source view).
|
||||
// <https://github.com/Ranchero-Software/NetNewsWire/issues/5370>
|
||||
if let markAllAsReadButton = (viewController(for: .supplementary) as? MainTimelineModernViewController)?.markAllAsReadButton {
|
||||
MarkAsReadAlertController.confirm(self, coordinator: coordinator, confirmTitle: title, sourceType: markAllAsReadButton, completion: completion)
|
||||
} else {
|
||||
MarkAsReadAlertController.confirm(self, coordinator: coordinator, confirmTitle: title, sourceType: view as UIView, completion: completion)
|
||||
}
|
||||
}
|
||||
|
||||
@objc func markAboveAsRead(_ sender: Any?) {
|
||||
|
||||
Reference in new issue
Block a user