Skip to content

Commit f852a50

Browse files
authored
CMM-988 android empty states use outdated visual styles (#22367)
* Replacing the old empty state illustration * Adding tags icon * Removing images and adding a more descriptive texts and ctas * Deleting vectors * Deleting the right file * typo * typo
1 parent d49c6a7 commit f852a50

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

WordPress/src/main/java/org/wordpress/android/ui/reader/ReaderPostListFragment.kt

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1711,7 +1711,7 @@ class ReaderPostListFragment : ViewPagerFragment(), OnPostSelectedListener, OnFo
17111711
var button: ActionableEmptyViewButtonType? = null
17121712

17131713
// Ensure the default image is reset for empty views before applying logic
1714-
actionableEmptyView!!.image.setImageResource(R.drawable.illustration_reader_empty)
1714+
actionableEmptyView!!.image.setImageResource(0)
17151715

17161716
if (shouldShowEmptyViewForSelfHostedCta()) {
17171717
setEmptyTitleAndDescriptionForSelfHostedCta()
@@ -1810,11 +1810,11 @@ class ReaderPostListFragment : ViewPagerFragment(), OnPostSelectedListener, OnFo
18101810
actionableEmptyView!!.subtitle.contentDescription =
18111811
getString(R.string.reader_empty_saved_posts_content_description)
18121812
actionableEmptyView!!.subtitle.visibility = View.VISIBLE
1813-
actionableEmptyView!!.button.setText(R.string.reader_empty_followed_blogs_button_subscriptions)
1813+
actionableEmptyView!!.button.setText(R.string.reader_no_followed_blogs_button_discover)
18141814
actionableEmptyView!!.button.visibility = View.VISIBLE
18151815
actionableEmptyView!!.button.setOnClickListener {
18161816
setCurrentTagFromEmptyViewButton(
1817-
ActionableEmptyViewButtonType.FOLLOWED
1817+
ActionableEmptyViewButtonType.DISCOVER
18181818
)
18191819
}
18201820
}
@@ -1832,9 +1832,16 @@ class ReaderPostListFragment : ViewPagerFragment(), OnPostSelectedListener, OnFo
18321832

18331833
actionableEmptyView!!.image.visibility = View.VISIBLE
18341834
actionableEmptyView!!.title.text =
1835-
getString(R.string.reader_self_hosted_select_filter)
1835+
getString(R.string.reader_empty_subscriptions)
18361836
actionableEmptyView!!.subtitle.visibility = View.GONE
1837-
actionableEmptyView!!.button.visibility = View.GONE
1837+
actionableEmptyView!!.button.setText(
1838+
R.string.reader_no_followed_blogs_button_discover
1839+
)
1840+
actionableEmptyView!!.button.setOnClickListener {
1841+
setCurrentTagFromEmptyViewButton(
1842+
ActionableEmptyViewButtonType.DISCOVER
1843+
)
1844+
}
18381845
}
18391846

18401847
private fun addBookmarkImageSpan(ssb: SpannableStringBuilder, imagePlaceholderPosition: Int) {
@@ -2354,14 +2361,8 @@ class ReaderPostListFragment : ViewPagerFragment(), OnPostSelectedListener, OnFo
23542361
activity.runOnUiThread {
23552362
if (isBookmarksList && isPostAdapterEmpty() && isAdded) {
23562363
setEmptyTitleAndDescriptionForBookmarksList()
2357-
actionableEmptyView!!.image.setImageResource(
2358-
R.drawable.illustration_reader_empty
2359-
)
23602364
showEmptyView()
23612365
} else if ((currentTag?.isListTopic() == true) && isPostAdapterEmpty() && isAdded) {
2362-
actionableEmptyView!!.image.setImageResource(
2363-
R.drawable.illustration_reader_empty
2364-
)
23652366
actionableEmptyView!!.title.text =
23662367
getString(R.string.reader_empty_blogs_posts_in_custom_list)
23672368
actionableEmptyView!!.image.visibility = View.VISIBLE

WordPress/src/main/java/org/wordpress/android/ui/reader/discover/ReaderDiscoverViewModel.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,6 @@ class ReaderDiscoverViewModel @Inject constructor(
518518
override val titleResId = R.string.reader_discover_no_posts_title
519519
override val buttonResId = R.string.reader_discover_no_posts_button_tags_text_follow
520520
override val subTitleRes = R.string.reader_discover_no_posts_follow_subtitle
521-
override val illustrationResId = R.drawable.illustration_reader_empty
522521
}
523522
}
524523
}

WordPress/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,6 +2397,7 @@
23972397
<string name="reader_empty_search_title">No results found</string>
23982398
<string name="reader_empty_search_description">No results found for %s for your language</string>
23992399
<string name="reader_empty_search_request_failed">Unable to perform search</string>
2400+
<string name="reader_empty_subscriptions">You haven\'t subscribed to any blogs yet</string>
24002401

24012402
<string name="dlg_confirm_clear_search_history">Clear search history?</string>
24022403
<string name="label_clear_search_history">Clear search history</string>

0 commit comments

Comments
 (0)