mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-12 03:45:34 +00:00
fix(ios): tweaks changes for Reachability update
This commit is contained in:
parent
23af4e2497
commit
f550617458
2 changed files with 2 additions and 2 deletions
|
|
@ -31,7 +31,7 @@ open class Alerts {
|
|||
public static func showDownloadErrorAlert(in vc: UIViewController, handler: @escaping AcceptanceHandler) {
|
||||
var networkReachable: Reachability?
|
||||
do {
|
||||
try networkReachable = Reachability(hostname: "www.keyman.com")
|
||||
try networkReachable = Reachability(hostname: "keyman.com")
|
||||
} catch {
|
||||
log.debug("reachability could not start")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class ResourceDownloadQueue: HTTPDownloadDelegate {
|
|||
|
||||
// Might should add a "withNotification: Bool" option for clarity.
|
||||
public func canExecute(_ batch: DownloadBatch) -> Bool {
|
||||
guard reachability?.connection != Reachability.Connection.unavailable else {
|
||||
guard hasConnection() else {
|
||||
let error = NSError(domain: "Keyman", code: 0,
|
||||
userInfo: [NSLocalizedDescriptionKey: "No internet connection"])
|
||||
downloadFailed(forBatch: batch, error: error)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue