aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard
diff options
context:
space:
mode:
authorRoopesh Chander <roop@roopc.net>2019-01-09 02:34:26 +0530
committerRoopesh Chander <roop@roopc.net>2019-01-14 14:52:35 +0530
commit4a8366421f6193a86f95e6595c440842b96aab10 (patch)
treefde0765a6ae966ff1b89da1735ef998f5b4afa4d /WireGuard
parentmacOS: Localize export sheets (diff)
downloadwireguard-apple-4a8366421f6193a86f95e6595c440842b96aab10.tar.xz
wireguard-apple-4a8366421f6193a86f95e6595c440842b96aab10.zip
iOS: Export log: Should present error from the main thread
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to 'WireGuard')
-rw-r--r--WireGuard/WireGuard/UI/iOS/ViewController/SettingsTableViewController.swift8
1 files changed, 4 insertions, 4 deletions
diff --git a/WireGuard/WireGuard/UI/iOS/ViewController/SettingsTableViewController.swift b/WireGuard/WireGuard/UI/iOS/ViewController/SettingsTableViewController.swift
index eced88d6..64cd0f7d 100644
--- a/WireGuard/WireGuard/UI/iOS/ViewController/SettingsTableViewController.swift
+++ b/WireGuard/WireGuard/UI/iOS/ViewController/SettingsTableViewController.swift
@@ -129,12 +129,12 @@ class SettingsTableViewController: UITableViewController {
}
let isWritten = Logger.global?.writeLog(called: "APP", mergedWith: networkExtensionLogFilePath, called: "NET", to: destinationURL.path) ?? false
- guard isWritten else {
- ErrorPresenter.showErrorAlert(title: tr("alertUnableToWriteLogTitle"), message: tr("alertUnableToWriteLogMessage"), from: self)
- return
- }
DispatchQueue.main.async {
+ guard isWritten else {
+ ErrorPresenter.showErrorAlert(title: tr("alertUnableToWriteLogTitle"), message: tr("alertUnableToWriteLogMessage"), from: self)
+ return
+ }
let activityVC = UIActivityViewController(activityItems: [destinationURL], applicationActivities: nil)
activityVC.popoverPresentationController?.sourceView = sourceView
activityVC.popoverPresentationController?.sourceRect = sourceView.bounds