Skip to content

Instantly share code, notes, and snippets.

@shiki
Created February 22, 2019 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiki/fc81257bf927f7f82b8aba1f725c18d2 to your computer and use it in GitHub Desktop.
Save shiki/fc81257bf927f7f82b8aba1f725c18d2 to your computer and use it in GitHub Desktop.
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