Skip to content

Commit

Permalink
clean code; sorted(using:)
Browse files Browse the repository at this point in the history
  • Loading branch information
krugerk committed Nov 21, 2024
1 parent e36081c commit f7076fd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions BeeSwift/Settings/ChooseHKMetricViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ class ChooseHKMetricViewController: UIViewController {

extension ChooseHKMetricViewController : UITableViewDelegate, UITableViewDataSource {
var sortedHKMetrics: [HealthKitMetric] {
HealthKitConfig.metrics.sorted { (lhs, rhs) -> Bool in
lhs.humanText < rhs.humanText
}
HealthKitConfig.metrics.sorted(using: SortDescriptor(\.humanText))
}

var sortedMetricsByCategory: Dictionary<HealthKitCategory, [HealthKitMetric]> {
Expand Down

0 comments on commit f7076fd

Please sign in to comment.