Skip to content

Commit

Permalink
Merge pull request #49 from getditto/BP/health_metrics_disk_usage
Browse files Browse the repository at this point in the history
Connects the new DiskUsage HealthMetricProvider
  • Loading branch information
bplattenburg authored May 29, 2024
2 parents f152bad + c227c33 commit c9c0f41
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion iOS/DittoPOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@
repositoryURL = "https://github.com/getditto/DittoSwiftTools";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 4.8.1;
minimumVersion = 4.9.0;
};
};
14CD51C42A2FE58E0018DE87 /* XCRemoteSwiftPackageReference "DittoSwiftPackage" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/getditto/DittoSwiftTools",
"state" : {
"revision" : "5e8e1f5614d05686bd9460b6e9e00a9c1f525092",
"version" : "4.8.1"
"revision" : "1c8bf29bc160a70a1d74e99f47efd132e572a940",
"version" : "4.9.0"
}
},
{
Expand Down
1 change: 1 addition & 0 deletions iOS/DittoPOS/Data/DittoService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class DittoService: ObservableObject {

static var shared = DittoService()
let ditto = DittoInstance.shared.ditto

private let storeService: StoreService
private let syncService: SyncService

Expand Down
7 changes: 6 additions & 1 deletion iOS/DittoPOS/Settings/HeartbeatConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import SwiftUI
import DittoHeartbeat
import DittoHealthMetrics
import DittoPermissionsHealth
import DittoDiskUsage

class HeartbeatConfigVM: ObservableObject {

Expand Down Expand Up @@ -45,7 +46,11 @@ class HeartbeatConfigVM: ObservableObject {
if self.heartbeatVM.isEnabled {
self.stopHeartbeat()
}
let healthMetricProviders: [HealthMetricProvider] = [DittoPermissionsHealth.BluetoothManager(), DittoPermissionsHealth.NetworkManager()]
let healthMetricProviders: [HealthMetricProvider] = [
DittoPermissionsHealth.BluetoothManager(),
DittoPermissionsHealth.NetworkManager(),
DittoDiskUsage.DiskUsageViewModel(ditto: DittoService.shared.ditto)
]
let hbConfig = DittoHeartbeatConfig(id: Settings.deviceId,
secondsInterval: self.secondsInterval,
metadata: self.metaData,
Expand Down

0 comments on commit c9c0f41

Please sign in to comment.