diff --git a/EasyTier/Views/LogView.swift b/EasyTier/Views/LogView.swift index 16e72a1..915a42d 100644 --- a/EasyTier/Views/LogView.swift +++ b/EasyTier/Views/LogView.swift @@ -102,10 +102,16 @@ struct LogView: 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)