Skip to content

Commit

Permalink
Maintain consistent top-down menu order in posts screen (#1185)
Browse files Browse the repository at this point in the history
* Maintain consistent top-down menu order in posts screen

* Delete CopyMarkdown extension and detritus

No more copypasting posts into issues for me.
  • Loading branch information
nolanw authored Mar 18, 2024
1 parent 38e8b4d commit 1db2f32
Show file tree
Hide file tree
Showing 17 changed files with 13 additions and 1,272 deletions.
9 changes: 8 additions & 1 deletion App/View Controllers/Posts/PostsPageViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}()
Expand Down Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
488 changes: 0 additions & 488 deletions Awful.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

78 changes: 0 additions & 78 deletions Awful.xcodeproj/xcshareddata/xcschemes/CopyMarkdownApp.xcscheme

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions CopyMarkdown/App/App.entitlements

This file was deleted.

18 changes: 0 additions & 18 deletions CopyMarkdown/App/AppDelegate.swift

This file was deleted.

This file was deleted.

58 changes: 0 additions & 58 deletions CopyMarkdown/App/Assets.xcassets/AppIcon.appiconset/Contents.json

This file was deleted.

6 changes: 0 additions & 6 deletions CopyMarkdown/App/Assets.xcassets/Contents.json

This file was deleted.

Loading

0 comments on commit 1db2f32

Please sign in to comment.