Fix showing deprecated warnings without link
This commit is contained in:
@@ -141,6 +141,18 @@ public struct DashboardView: View {
|
|||||||
private func loopShowDeprecateNotes(_ reports: any LibboxDeprecatedNoteIteratorProtocol) {
|
private func loopShowDeprecateNotes(_ reports: any LibboxDeprecatedNoteIteratorProtocol) {
|
||||||
if reports.hasNext() {
|
if reports.hasNext() {
|
||||||
let report = reports.next()!
|
let report = reports.next()!
|
||||||
|
if report.migrationLink.isEmpty {
|
||||||
|
alert = Alert(
|
||||||
|
title: Text("Deprecated Warning"),
|
||||||
|
message: Text(report.message()),
|
||||||
|
dismissButton: .cancel(Text("Ok")) {
|
||||||
|
Task.detached {
|
||||||
|
try await Task.sleep(nanoseconds: 300 * MSEC_PER_SEC)
|
||||||
|
await loopShowDeprecateNotes(reports)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
} else {
|
||||||
alert = Alert(
|
alert = Alert(
|
||||||
title: Text("Deprecated Warning"),
|
title: Text("Deprecated Warning"),
|
||||||
message: Text(report.message()),
|
message: Text(report.message()),
|
||||||
@@ -160,6 +172,7 @@ public struct DashboardView: View {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private nonisolated func checkServiceError() async {
|
private nonisolated func checkServiceError() async {
|
||||||
var error: NSError?
|
var error: NSError?
|
||||||
|
|||||||
Reference in New Issue
Block a user