Skip to content

Commit

Permalink
Pass users followed tags to endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
nbradbury committed Feb 24, 2025
1 parent 2ca27b9 commit ab30a95
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@ class ReaderDiscoverLogic @Inject constructor(
params["tag_recs_per_card"] = RECOMMENDED_TAGS_COUNT

// default to requesting the dailyprompt and wordpress tags if the user isn't following any tags,
// otherwise pass no tags and let the backend supply the user's followed tags. note that we
// filter out the dailyprompt tag since new users have that tag followed by default.
// otherwise pass the user's followed tags. note we filter out the dailyprompt tag when doing
// our empty comparison since new users have that tag followed by default.
val userTags = getFollowedTagsUseCase.get()
if (userTags.filterNot { it.tagSlug == BLOGGING_PROMPT_TAG }.isEmpty()) {
params["tags"] = "$BLOGGING_PROMPT_TAG,wordpress"
} else {
params["tags"] = userTags.joinToString(",") { it.tagSlug }
}

when (taskType) {
Expand Down

0 comments on commit ab30a95

Please sign in to comment.