Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
theospears committed Aug 1, 2024
1 parent c1fd3fa commit 0527f22
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion BeeKit/GoalProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ extension GoalProtocol {
/// A hint for the value the user is likely to enter, based on past data points
public var suggestedNextValue: NSNumber? {
let recentData = self.recentData
for dataPoint in recentData.map({ $0 as! any DataPointProtocol }).sorted(by: { $0.updatedAt > $1.updatedAt }) {
for dataPoint in recentData.sorted(by: { $0.updatedAt > $1.updatedAt }) {
let comment = dataPoint.comment
// Ignore data points with comments suggesting they aren't a real value
if comment.contains("#DERAIL") || comment.contains("#SELFDESTRUCT") || comment.contains("#THISWILLSELFDESTRUCT") || comment.contains("#RESTART") || comment.contains("#TARE") {
Expand Down
2 changes: 1 addition & 1 deletion BeeSwift/Settings/HealthKitConfigViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class HealthKitConfigViewController: UIViewController {
MBProgressHUD.showAdded(to: self.view, animated: true)
do {
try await ServiceLocator.goalManager.refreshGoals()
let goals = try await ServiceLocator.goalManager.staleGoals(context: ServiceLocator.persistentContainer.viewContext) ?? []
let goals = ServiceLocator.goalManager.staleGoals(context: ServiceLocator.persistentContainer.viewContext) ?? []
MBProgressHUD.hide(for: self.view, animated: true)
self.goals = goals
self.sortGoals()
Expand Down
2 changes: 1 addition & 1 deletion BeeSwift/Settings/RemoveHKMetricViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class RemoveHKMetricViewController: UIViewController {

Task { @MainActor in
do {
let responseObject = try await ServiceLocator.requestManager.put(url: "api/v1/users/{username}/goals/\(self.goal!.slug).json", parameters: params)
let _ = try await ServiceLocator.requestManager.put(url: "api/v1/users/{username}/goals/\(self.goal!.slug).json", parameters: params)

try await ServiceLocator.goalManager.refreshGoal(self.goal)

Expand Down

0 comments on commit 0527f22

Please sign in to comment.