Skip to content

Commit

Permalink
scrub old name from code
Browse files Browse the repository at this point in the history
in Shortcuts, HealthKit, FileStorageTests, and URLs
  • Loading branch information
MikePlante1 committed May 9, 2024
1 parent d7ff29b commit 08e6a80
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 14 deletions.
6 changes: 1 addition & 5 deletions FreeAPS/Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
<dict>
<key>AppGroupID</key>
<string>$(APP_GROUP_ID)</string>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>com.freeapsx.background-task.critical-event-log</string>
</array>
<key>CBBundleDisplayName</key>
<string>$(APP_DISPLAY_NAME)</string>
<key>CFBundleDevelopmentRegion</key>
Expand All @@ -32,7 +28,7 @@
<key>CFBundleTypeRole</key>
<string>None</string>
<key>CFBundleURLName</key>
<string>com.artificial-pancreas-iaps</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleURLSchemes</key>
<array>
<string>$(APP_URL_SCHEME)</string>
Expand Down
4 changes: 2 additions & 2 deletions FreeAPS/Sources/Services/HealthKit/HealthKitManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,8 @@ final class BaseHealthKitManager: HealthKitManager, Injectable, CarbsObserver, P

newGlucose += samples
.compactMap { sample -> HealthKitSample? in
let fromFAX = sample.metadata?[Config.freeAPSMetaKey] as? Bool ?? false
guard !fromFAX else { return nil }
let fromTrio = sample.metadata?[Config.freeAPSMetaKey] as? Bool ?? false
guard !fromTrio else { return nil }
return HealthKitSample(
healthKitId: sample.uuid.uuidString,
date: sample.startDate,
Expand Down
4 changes: 2 additions & 2 deletions FreeAPS/Sources/Shortcuts/State/ListStateIntent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ import Foundation
Summary("List all states of Trio")
}

@MainActor func perform() async throws -> some ReturnsValue<StateiAPSResults> & ShowsSnippetView {
@MainActor func perform() async throws -> some ReturnsValue<StateResults> & ShowsSnippetView {
let glucoseValues = try? stateIntent.getLastBG()
let iob_cob_value = try? stateIntent.getIOB_COB()

guard let glucoseValue = glucoseValues else { throw StateIntentError.NoBG }
guard let iob_cob = iob_cob_value else { throw StateIntentError.NoIOBCOB }
let BG = StateiAPSResults(
let BG = StateResults(
glucose: glucoseValue.glucose,
trend: glucoseValue.trend,
delta: glucoseValue.delta,
Expand Down
2 changes: 1 addition & 1 deletion FreeAPS/Sources/Shortcuts/State/ListStateView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Foundation
import SwiftUI

struct ListStateView: View {
var state: StateiAPSResults
var state: StateResults

private var numberFormatter: NumberFormatter {
let formatter = NumberFormatter()
Expand Down
6 changes: 3 additions & 3 deletions FreeAPS/Sources/Shortcuts/State/StateIntentRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ enum StateIntentError: Error {
case NoIOBCOB
}

@available(iOS 16, *) struct StateiAPSResults: AppEntity {
@available(iOS 16, *) struct StateResults: AppEntity {
static var defaultQuery = StateBGQuery()

static var typeDisplayRepresentation: TypeDisplayRepresentation = "Trio State Result"
Expand Down Expand Up @@ -44,11 +44,11 @@ enum StateIntentError: Error {
}

@available(iOS 16.0, *) struct StateBGQuery: EntityQuery {
func entities(for _: [StateiAPSResults.ID]) async throws -> [StateiAPSResults] {
func entities(for _: [StateResults.ID]) async throws -> [StateResults] {
[]
}

func suggestedEntities() async throws -> [StateiAPSResults] {
func suggestedEntities() async throws -> [StateResults] {
[]
}
}
Expand Down
2 changes: 1 addition & 1 deletion FreeAPSTests/FileStorageTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class FileStorageTests: XCTestCase {
let value: Decimal
}

func testFileStorageOiAPS() {
func testFileStorageTrio() {
let dummyObject = DummyObject(id: "21342Z", value: 78.2)
fileStorage.save(dummyObject, as: "dummyObject")
let dummyObjectRetrieve = fileStorage.retrieve("dummyObject", as: DummyObject.self)
Expand Down

0 comments on commit 08e6a80

Please sign in to comment.