Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions EasyTier/Views/LogView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,16 @@ struct LogView<Manager: NetworkExtensionManagerProtocol>: View {
break
}
}
.alert(item: $tailer.errorMessage) { msg in
Alert(title: Text("common.error"), message: Text(msg.text))
}
.alert(item: $exportErrorMessage) { msg in
// One alert for the view. Two of them stacked here does not reliably present both, and
// it was the second that lost: every export error, including "Log file not found.",
// was dropped without a trace and the share button looked dead.
.alert(item: Binding(
get: { tailer.errorMessage ?? exportErrorMessage },
set: { _ in
tailer.errorMessage = nil
exportErrorMessage = nil
}
)) { msg in
Alert(title: Text("common.error"), message: Text(msg.text))
}
#if os(iOS)
Expand Down