Skip to content

Commit

Permalink
Made the row context menu more consistent with itself and the main menu
Browse files Browse the repository at this point in the history
  • Loading branch information
vincode-io committed Sep 19, 2024
1 parent 419b761 commit bb085b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Zavala/Editor/EditorViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2808,7 +2808,6 @@ private extension EditorViewController {

var outlineActions = [UIAction]()
outlineActions.append(self.addAction(rows: rows))
outlineActions.append(self.duplicateAction(rows: rows))
if !outline.isCompleteUnavailable(rows: rows) {
outlineActions.append(self.completeAction(rows: rows))
}
Expand All @@ -2821,6 +2820,7 @@ private extension EditorViewController {
if !outline.isDeleteNotesUnavailable(rows: rows) {
outlineActions.append(self.deleteNoteAction(rows: rows))
}
outlineActions.append(self.duplicateAction(rows: rows))
if !outline.isGroupRowsUnavailable(rows: rows) {
outlineActions.append(self.groupAction(rows: rows))
}
Expand Down Expand Up @@ -2892,7 +2892,8 @@ private extension EditorViewController {
}

func duplicateAction(rows: [Row]) -> UIAction {
return UIAction(title: .duplicateControlLabel, image: .duplicate) { [weak self] action in
let title = rows.count == 1 ? String.duplicateRowControlLabel : String.duplicateRowsControlLabel
return UIAction(title: title, image: .duplicate) { [weak self] action in
self?.duplicateRows(rows)
}
}
Expand Down

0 comments on commit bb085b5

Please sign in to comment.