diff --git a/Kiwix-iOS/Controller/Alerts.swift b/Kiwix-iOS/Controller/Alerts.swift index a1f3509a..f00d3cee 100644 --- a/Kiwix-iOS/Controller/Alerts.swift +++ b/Kiwix-iOS/Controller/Alerts.swift @@ -12,7 +12,6 @@ import Operations class SpaceNotEnoughAlert: AlertOperation { init(context: UIViewController) { super.init(presentAlertFrom: context) - title = LocalizedStrings.Library.spaceNotEnough message = NSLocalizedString("Please free up some space and try again.", comment: "Library, Space Alert") addActionWithTitle(LocalizedStrings.cancel) @@ -44,7 +43,16 @@ class RemoveBookConfirmationAlert: AlertOperation { let operation = RemoveBookOperation(bookID: bookID) GlobalQueue.shared.addOperation(operation) } - addActionWithTitle(LocalizedStrings.cancel) + addActionWithTitle(LocalizedStrings.ok) preferredAction = actions[0] } } + +class NetworkRequiredAlert: AlertOperation { + init(context: UIViewController) { + super.init(presentAlertFrom: context) + title = NSLocalizedString("Network Required", comment: "Network Required Alert") + message = NSLocalizedString("Unable to connect to server. Please check your Internet connection.", comment: "Network Required Alert") + addActionWithTitle(LocalizedStrings.cancel) + } +} diff --git a/Kiwix-iOS/Controller/Library/CloudBooksController.swift b/Kiwix-iOS/Controller/Library/CloudBooksController.swift index c68e378b..e5794303 100644 --- a/Kiwix-iOS/Controller/Library/CloudBooksController.swift +++ b/Kiwix-iOS/Controller/Library/CloudBooksController.swift @@ -133,12 +133,8 @@ class CloudBooksController: UITableViewController, NSFetchedResultsControllerDel } func showReachibilityAlert() { - let cancel = UIAlertAction(title: LocalizedStrings.Common.ok, style: .Cancel, handler: nil) - let alertController = UIAlertController(title: NSLocalizedString("Network Required", comment: "Network Required Alert"), - message: NSLocalizedString("Unable to connect to server. Please check your Internet connection.", comment: "Network Required Alert"), - preferredStyle: .Alert) - alertController.addAction(cancel) - self.presentViewController(alertController, animated: true, completion: nil) + let operation = NetworkRequiredAlert(context: self) + GlobalQueue.shared.addOperation(operation) } func showLanguageFilterAlert() { diff --git a/Kiwix-iOS/Info.plist b/Kiwix-iOS/Info.plist index 63360c27..4e71dd87 100644 --- a/Kiwix-iOS/Info.plist +++ b/Kiwix-iOS/Info.plist @@ -49,7 +49,7 @@ CFBundleVersion - 1.8.649 + 1.8.652 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS diff --git a/Kiwix-iOSWidgets/Bookmarks/Info.plist b/Kiwix-iOSWidgets/Bookmarks/Info.plist index 2770278f..45e5b369 100644 --- a/Kiwix-iOSWidgets/Bookmarks/Info.plist +++ b/Kiwix-iOSWidgets/Bookmarks/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 1.8.652 + 1.8.655 NSExtension NSExtensionMainStoryboard