Add milestone creation and editing
This commit is contained in:
@@ -154,11 +154,12 @@ final class IssueViewController: MarkdownPageViewController {
|
||||
)
|
||||
addComment.accessibilityLabel = "Add comment"
|
||||
let editIssue = UIBarButtonItem(
|
||||
title: "Edit",
|
||||
image: context.symbol("pencil"),
|
||||
style: .plain,
|
||||
target: self,
|
||||
action: #selector(editIssue)
|
||||
)
|
||||
editIssue.accessibilityLabel = "Edit issue"
|
||||
navigationItem.rightBarButtonItems = [addComment, editIssue]
|
||||
loadContent(refreshing: false)
|
||||
}
|
||||
@@ -884,15 +885,15 @@ private func commentViews(
|
||||
var headerViews: [UIView] = [author, UIView()]
|
||||
if comment.canEdit, let editComment {
|
||||
var configuration = UIButton.Configuration.plain()
|
||||
configuration.title = "Edit"
|
||||
configuration.image = UIImage(systemName: "pencil")
|
||||
configuration.imagePadding = 5
|
||||
configuration.contentInsets = .zero
|
||||
let button = UIButton(
|
||||
configuration: configuration,
|
||||
primaryAction: UIAction { _ in editComment(comment) }
|
||||
)
|
||||
button.accessibilityLabel = "Edit comment by \(comment.author)"
|
||||
button.widthAnchor.constraint(equalToConstant: 44).isActive = true
|
||||
button.heightAnchor.constraint(equalToConstant: 44).isActive = true
|
||||
headerViews.append(button)
|
||||
}
|
||||
let header = UIStackView(arrangedSubviews: headerViews)
|
||||
|
||||
Reference in New Issue
Block a user