parent
ae9e200618
commit
25470e61e5
|
@ -50,14 +50,16 @@ struct DiagnosticsView: View {
|
||||||
@AppStorage(AppPreference.logsPrivateData.key, store: .appGroup)
|
@AppStorage(AppPreference.logsPrivateData.key, store: .appGroup)
|
||||||
private var logsPrivateData = false
|
private var logsPrivateData = false
|
||||||
|
|
||||||
var availableTunnelLogs: () -> [LogEntry] = {
|
var availableTunnelLogs: () async -> [LogEntry] = {
|
||||||
PassepartoutConfiguration.shared.availableLogs(at: BundleConfiguration.urlForTunnelLog)
|
await Task.detached {
|
||||||
.sorted {
|
PassepartoutConfiguration.shared.availableLogs(at: BundleConfiguration.urlForTunnelLog)
|
||||||
$0.key > $1.key
|
.sorted {
|
||||||
}
|
$0.key > $1.key
|
||||||
.map {
|
}
|
||||||
LogEntry(date: $0, url: $1)
|
.map {
|
||||||
}
|
LogEntry(date: $0, url: $1)
|
||||||
|
}
|
||||||
|
}.value
|
||||||
}
|
}
|
||||||
|
|
||||||
@State
|
@State
|
||||||
|
@ -81,8 +83,8 @@ struct DiagnosticsView: View {
|
||||||
reportIssueSection
|
reportIssueSection
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onLoad {
|
.task {
|
||||||
tunnelLogs = availableTunnelLogs()
|
tunnelLogs = await availableTunnelLogs()
|
||||||
}
|
}
|
||||||
.themeForm()
|
.themeForm()
|
||||||
.navigationTitle(Strings.Views.Diagnostics.title)
|
.navigationTitle(Strings.Views.Diagnostics.title)
|
||||||
|
|
Loading…
Reference in New Issue