Skip to content

Commit

Permalink
Changed redundant network messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
nbradbury committed Oct 7, 2024
1 parent 1281a8b commit 04d03e7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class GifMediaDataSource
if (!networkUtilsWrapper.isNetworkAvailable()) {
return Failure(
UiStringRes(R.string.no_network_title),
htmlSubtitle = UiStringRes(R.string.no_network_message),
htmlSubtitle = UiStringRes(R.string.no_network_subtitle),
image = R.drawable.img_illustration_cloud_off_152dp,
data = items
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class MediaLibraryDataSource(
if (!networkUtilsWrapper.isNetworkAvailable()) {
return Failure(
UiStringRes(R.string.no_network_title),
htmlSubtitle = UiStringRes(R.string.no_network_message),
htmlSubtitle = UiStringRes(R.string.no_network_subtitle),
image = R.drawable.img_illustration_cloud_off_152dp,
data = if (loadMore) get(mediaTypes, filter) else listOf()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class StockMediaDataSource
if (!networkUtilsWrapper.isNetworkAvailable()) {
return Failure(
UiStringRes(R.string.no_network_title),
htmlSubtitle = UiStringRes(R.string.no_network_message),
htmlSubtitle = UiStringRes(R.string.no_network_subtitle),
image = R.drawable.img_illustration_cloud_off_152dp,
data = if (loadMore) get() else listOf()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ fun OfflineView() {
MessageView(
R.drawable.ic_wifi_off_24px,
R.string.no_network_title,
R.string.no_network_message,
R.string.no_network_subtitle,
)
}

Expand Down
1 change: 1 addition & 0 deletions WordPress/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
site XMLRPC endpoint. The app needs that in order to communicate with your site. Contact your host to solve
this problem.</string>
<string name="no_network_title">No network available</string>
<string name="no_network_subtitle">Try again after reconnecting</string>
<string name="no_network_message">There is no network available</string>
<string name="request_failed_message">There was a problem handling the request. Please try again later.</string>
<string name="sign_out_wpcom_confirm_with_changes">You have changes to posts that haven’t been uploaded to your site. Logging out now will delete those changes from your device. Log out anyway?</string>
Expand Down

0 comments on commit 04d03e7

Please sign in to comment.