Skip to content

Commit

Permalink
Merge branch 'beeminder:master' into bye-bye-today-view-extension
Browse files Browse the repository at this point in the history
  • Loading branch information
krugerk authored Oct 24, 2024
2 parents 03d40f4 + 5be8685 commit e7866f9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
13 changes: 5 additions & 8 deletions BeeKit/GoalExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,10 @@ extension Goal {

/// 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.sorted(by: { $0.updatedAt > $1.updatedAt }) {
if dataPoint.isMeta() {
continue
}
return dataPoint.value
}
return nil
let candidateDatapoints = self.recentData
.filter { !$0.isMeta() }
.sorted(using: [SortDescriptor(\.updatedAt, order: .reverse)])

return candidateDatapoints.first?.value
}
}
8 changes: 4 additions & 4 deletions BeeSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
E458C8352AD1266B000DCA5C /* SwiftyJSON in Frameworks */ = {isa = PBXBuildFile; productRef = E458C8342AD1266B000DCA5C /* SwiftyJSON */; };
E458C8372AD12671000DCA5C /* KeychainSwift in Frameworks */ = {isa = PBXBuildFile; productRef = E458C8362AD12671000DCA5C /* KeychainSwift */; };
E46071012B451FA400305DB4 /* BeeminderModel.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = E41286EC2A62DF330093D598 /* BeeminderModel.xcdatamodeld */; };
E46071022B451FAC00305DB4 /* BeeminderPersistantContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E46070F72B3FEFD400305DB4 /* BeeminderPersistantContainer.swift */; };
E46071022B451FAC00305DB4 /* BeeminderPersistentContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = E46070F72B3FEFD400305DB4 /* BeeminderPersistentContainer.swift */; };
E46071032B451FB100305DB4 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = E46070EE2B36A4D900305DB4 /* User.swift */; };
E462BA3629AC44EA00E80EF0 /* Alamofire in Frameworks */ = {isa = PBXBuildFile; productRef = E462BA3529AC44EA00E80EF0 /* Alamofire */; };
E462BA3929AC450000E80EF0 /* AlamofireImage in Frameworks */ = {isa = PBXBuildFile; productRef = E462BA3829AC450000E80EF0 /* AlamofireImage */; };
Expand Down Expand Up @@ -295,7 +295,7 @@
E45470292B60E25C00EE648B /* DaystampTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DaystampTests.swift; sourceTree = "<group>"; };
E457BE5C28C192B50012F5D0 /* IntentHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntentHandler.swift; sourceTree = "<group>"; };
E46070EE2B36A4D900305DB4 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
E46070F72B3FEFD400305DB4 /* BeeminderPersistantContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BeeminderPersistantContainer.swift; sourceTree = "<group>"; };
E46070F72B3FEFD400305DB4 /* BeeminderPersistentContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BeeminderPersistentContainer.swift; sourceTree = "<group>"; };
E462BA2D29A31C3B00E80EF0 /* SynchronizedBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SynchronizedBox.swift; sourceTree = "<group>"; };
E46DC80E2AA58DF20059FDFE /* PullToRefreshHint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PullToRefreshHint.swift; sourceTree = "<group>"; };
E46FF15A2984C522009F8C7A /* DateUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateUtils.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -570,7 +570,7 @@
isa = PBXGroup;
children = (
E41286EC2A62DF330093D598 /* BeeminderModel.xcdatamodeld */,
E46070F72B3FEFD400305DB4 /* BeeminderPersistantContainer.swift */,
E46070F72B3FEFD400305DB4 /* BeeminderPersistentContainer.swift */,
E46070EE2B36A4D900305DB4 /* User.swift */,
E4E8DD3A2BE87F890059C64F /* Goal.swift */,
E4E8DD3C2BE881440059C64F /* DataPoint.swift */,
Expand Down Expand Up @@ -1106,7 +1106,7 @@
E458C80E2AD11C77000DCA5C /* HealthStoreManager.swift in Sources */,
E458C8062AD11BCD000DCA5C /* GoalManager.swift in Sources */,
E458C8272AD11F81000DCA5C /* BSLabel.swift in Sources */,
E46071022B451FAC00305DB4 /* BeeminderPersistantContainer.swift in Sources */,
E46071022B451FAC00305DB4 /* BeeminderPersistentContainer.swift in Sources */,
E4E63C732C5DDE98005E00DA /* GoalExtensions.swift in Sources */,
E458C8252AD11E01000DCA5C /* BSButton.swift in Sources */,
E458C81D2AD11CEC000DCA5C /* UIDevice.swift in Sources */,
Expand Down

0 comments on commit e7866f9

Please sign in to comment.