Skip to content

Commit f40857e

Browse files
committed
fix: Fix label name for device metrics
1 parent 59a62d8 commit f40857e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

FileBrowserClient/FileBrowserClient/Utilities/DeviceMetrics.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ func getCPUUsage() -> Double? {
4747

4848
var totalUsageOfCPU = 0.0
4949

50-
for i in 0..<Int(threadCount) {
50+
for index in 0..<Int(threadCount) {
5151
var threadInfo = thread_basic_info()
5252
var threadInfoCount = mach_msg_type_number_t(THREAD_INFO_MAX)
5353

5454
let result = withUnsafeMutablePointer(to: &threadInfo) {
5555
$0.withMemoryRebound(to: integer_t.self, capacity: Int(threadInfoCount)) {
56-
thread_info(threads[i], thread_flavor_t(THREAD_BASIC_INFO), $0, &threadInfoCount)
56+
thread_info(threads[index], thread_flavor_t(THREAD_BASIC_INFO), $0, &threadInfoCount)
5757
}
5858
}
5959

FileBrowserClient/FileBrowserClient/Views/FileListView.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ struct FileListView: View {
8484
@State private var showLocalFileContent: Bool = false
8585
@State private var selectedLocalFile: URL?
8686

87-
@State private var showMemoryUsage: Bool = false
87+
@State private var showDeviceMetrics: Bool = false
8888

8989
private var viewMode: ViewMode {
9090
get { ViewMode(rawValue: viewModeRawValue) ?? .list }
@@ -536,15 +536,15 @@ struct FileListView: View {
536536
}
537537
}
538538

539-
private var showMemoryUsageView: some View {
539+
private var showDeviceMetricsView: some View {
540540
NavigationView {
541541
MetricsView()
542542
.frame(maxWidth: UIScreen.main.bounds.width * 0.8)
543543
.navigationTitle("Device Metrics")
544544
.toolbar {
545545
ToolbarItem(placement: .cancellationAction) {
546546
Button("Close") {
547-
showLocalFilePicker = false
547+
showDeviceMetrics = false
548548
}
549549
}
550550
}
@@ -643,12 +643,12 @@ struct FileListView: View {
643643
}
644644

645645
Section {
646-
Button("Memory Usage") {
647-
showMemoryUsage = true
646+
Button("Device Metrics") {
647+
showDeviceMetrics = true
648648
}
649649
}
650-
.fullScreenCover(isPresented: $showMemoryUsage) {
651-
showMemoryUsageView
650+
.fullScreenCover(isPresented: $showDeviceMetrics) {
651+
showDeviceMetricsView
652652
}
653653

654654
Section(header: Text("Client Storage")) {

0 commit comments

Comments
 (0)