diff --git a/App/View Controllers/Posts/PostsPageViewController.swift b/App/View Controllers/Posts/PostsPageViewController.swift index b8d473803..1eac750d7 100644 --- a/App/View Controllers/Posts/PostsPageViewController.swift +++ b/App/View Controllers/Posts/PostsPageViewController.swift @@ -110,6 +110,9 @@ final class PostsPageViewController: ViewController { private lazy var hiddenMenuButton: HiddenMenuButton = { let postActionButton = HiddenMenuButton() postActionButton.alpha = 0 + if #available(iOS 16.0, *) { + postActionButton.preferredMenuElementOrder = .fixed + } postsView.addSubview(postActionButton) return postActionButton }() @@ -555,7 +558,11 @@ final class PostsPageViewController: ViewController { private func actionsItem() -> UIBarButtonItem { - UIBarButtonItem(title: "Menu", image: UIImage(named: "steamed-ham"), primaryAction: nil, menu: threadActionsMenu()) + let buttonItem = UIBarButtonItem(title: "Menu", image: UIImage(named: "steamed-ham"), menu: threadActionsMenu()) + if #available(iOS 16.0, *) { + buttonItem.preferredMenuElementOrder = .fixed + } + return buttonItem } private func refetchPosts() { diff --git a/App/View Controllers/Threads/BookmarksTableViewController.swift b/App/View Controllers/Threads/BookmarksTableViewController.swift index 324a95037..fe96846ce 100644 --- a/App/View Controllers/Threads/BookmarksTableViewController.swift +++ b/App/View Controllers/Threads/BookmarksTableViewController.swift @@ -292,10 +292,14 @@ extension BookmarksTableViewController { contextMenuConfigurationForRowAt indexPath: IndexPath, point: CGPoint ) -> UIContextMenuConfiguration? { - return .makeFromThreadList( + let configuration = UIContextMenuConfiguration.makeFromThreadList( for: dataSource!.thread(at: indexPath), presenter: self ) + if #available(iOS 16.0, *) { + configuration.preferredMenuElementOrder = .fixed + } + return configuration } }