Created
February 22, 2019 14:47
-
-
Save shiki/fc81257bf927f7f82b8aba1f725c18d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/WordPress/Classes/ViewRelated/System/NetworkAware.swift b/WordPress/Classes/ViewRelated/System/NetworkAware.swift | |
index 2a15b3b88d..3533976cd8 100644 | |
--- a/WordPress/Classes/ViewRelated/System/NetworkAware.swift | |
+++ b/WordPress/Classes/ViewRelated/System/NetworkAware.swift | |
@@ -1,3 +1,4 @@ | |
+import WordPressFlux | |
/// Abstracts elements that need to be aware of the network connection status. | |
protocol NetworkAware { | |
@@ -31,9 +32,11 @@ extension NetworkAwareUI { | |
} | |
func presentNoNetworkAlert() { | |
- let title = NSLocalizedString("Unable to Sync", comment: "Title of error prompt shown when a sync the user initiated fails.") | |
- let message = NSLocalizedString("The Internet connection appears to be offline.", comment: "Message of error prompt shown when a sync the user initiated fails.") | |
- WPError.showAlert(withTitle: title, message: message) | |
+ let notice = Notice( | |
+ title: "", | |
+ message: NSLocalizedString("No internet connection. Some posts may be unavailable while offline.", comment: "Message of error prompt shown when a sync the user initiated fails.") | |
+ ) | |
+ ActionDispatcher.dispatch(NoticeAction.post(notice)) | |
} | |
func noConnectionMessage() -> String { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment