Skip to content

Commit 66a42bd

Browse files
authored
Recommendation list title improvements and remove current podcast (#4013)
1 parent f3db2a1 commit 66a42bd

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

modules/features/discover/src/main/res/layout/row_podcast_large_list_with_podcast.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
android:layout_width="wrap_content"
5454
android:layout_height="wrap_content"
5555
tools:text="The Daily"
56-
style="@style/H20"
56+
style="@style/H30"
5757
android:includeFontPadding="false"
58-
android:maxLines="2"
58+
android:maxLines="1"
5959
android:ellipsize="end"
6060
android:textColor="?attr/primary_text_01"/>
6161

modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/viewmodel/podcast/RecommendationsHandler.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class RecommendationsHandler @Inject constructor(
4444
if (enabled) {
4545
getRecommendationsMaybe(podcastUuid)
4646
.toFlowable()
47+
.removePodcast(podcastUuid)
4748
.addSubscribedStatusFlowable()
4849
.map { listFeed ->
4950
if (listFeed.podcasts.isNullOrEmpty()) {
@@ -69,6 +70,13 @@ class RecommendationsHandler @Inject constructor(
6970
)
7071
}
7172

73+
private fun Flowable<ListFeed>.removePodcast(podcastUuid: String): Flowable<ListFeed> {
74+
return map { list ->
75+
val filteredPodcasts = list.podcasts?.filter { it.uuid != podcastUuid }
76+
list.copy(podcasts = filteredPodcasts)
77+
}
78+
}
79+
7280
private fun Flowable<ListFeed>.addSubscribedStatusFlowable(): Flowable<ListFeed> {
7381
return switchMap { list ->
7482
podcastManager.getSubscribedPodcastUuidsRxSingle()

modules/services/localization/src/main/java/au/com/shiftyjelly/pocketcasts/localization/helper/LocaliseHelper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ object LocaliseHelper {
8282
"popular in [regionname]" to R.string.discover_popular_in,
8383
"most popular in [category]" to R.string.discover_most_popular_in,
8484
"loved by listeners of" to R.string.recommendations_loved_by_listeners,
85-
"if you like" to R.string.recommendations_if_you_like,
85+
"because you like" to R.string.recommendations_because_you_like,
8686
)
8787

8888
private val serverMessageIdToStringId = mapOf(

modules/services/localization/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1793,7 +1793,7 @@
17931793
<string name="discover_select_categories">Select a category</string>
17941794
<string name="discover_show_all_categories">Show all categories</string>
17951795
<string name="discover_dismiss_selected_category">Dismiss selected category</string>
1796-
<string name="recommendations_if_you_like">If you like</string>
1796+
<string name="recommendations_because_you_like">Because you like</string>
17971797
<string name="recommendations_loved_by_listeners">Loved by listeners of</string>
17981798
<string name="recommended_by_creator">Recommended shows by the creator</string>
17991799
<string name="similar_shows_to">Shows similar to \"%s\"</string>

0 commit comments

Comments
 (0)