From 419b76185f9a967665355240acb57d80b24a2cec Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Sat, 14 Sep 2024 16:13:07 -0500 Subject: [PATCH] Remove unnecessary string literal --- Zavala/AppAssets.swift | 1 - Zavala/Editor/EditorViewController.swift | 9 +-------- Zavala/Resources/Localizable.xcstrings | 3 --- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/Zavala/AppAssets.swift b/Zavala/AppAssets.swift index 025404a2..5fcf8b09 100644 --- a/Zavala/AppAssets.swift +++ b/Zavala/AppAssets.swift @@ -351,7 +351,6 @@ extension String { static let shareControlLabel = String(localized: "Share", comment: "Control Label: Share") static let shareEllipsisControlLabel = String(localized: "Share…", comment: "Control Label: Share…") static let smallControlLabel = String(localized: "Small", comment: "Control Label: Small") - static let sortRowControlLabel = String(localized: "Sort Row", comment: "Control Label: Sort Row") static let sortRowsControlLabel = String(localized: "Sort Rows", comment: "Control Label: Sort Rows") static let splitRowControlLabel = String(localized: "Split Row", comment: "Control Label: Split Row") static let statisticsControlLabel = String(localized: "Statistics", comment: "Control Label: Statistics") diff --git a/Zavala/Editor/EditorViewController.swift b/Zavala/Editor/EditorViewController.swift index b812340c..56ca2598 100644 --- a/Zavala/Editor/EditorViewController.swift +++ b/Zavala/Editor/EditorViewController.swift @@ -672,12 +672,6 @@ class EditorViewController: UIViewController, DocumentsActivityItemsConfiguratio } else { command.title = .groupRowControlLabel } - case .sortCurrentRows: - if currentRows?.count ?? 0 > 1 { - command.title = .sortRowsControlLabel - } else { - command.title = .sortRowControlLabel - } case .deleteCurrentRows: if currentRows?.count ?? 0 > 1 { command.title = .deleteRowsControlLabel @@ -2963,8 +2957,7 @@ private extension EditorViewController { } func sortAction(rows: [Row]) -> UIAction { - let title = rows.count == 1 ? String.sortRowControlLabel : String.sortRowsControlLabel - return UIAction(title: title, image: .sortRows) { [weak self] action in + return UIAction(title: .sortRowsControlLabel, image: .sortRows) { [weak self] action in self?.sortCurrentRows(rows) } } diff --git a/Zavala/Resources/Localizable.xcstrings b/Zavala/Resources/Localizable.xcstrings index 3d93beac..200fd71a 100644 --- a/Zavala/Resources/Localizable.xcstrings +++ b/Zavala/Resources/Localizable.xcstrings @@ -1038,9 +1038,6 @@ "Small" : { "comment" : "Control Label: Small" }, - "Sort Row" : { - "comment" : "Control Label: Sort Row" - }, "Sort Rows" : { "comment" : "Control Label: Sort Rows" },