Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Podcast Feed Reload] Pull Down to Reload feed #2714

Merged
merged 3 commits into from
Feb 3, 2025

Conversation

danielebogo
Copy link
Contributor

📘 Part of: #2703

Fixes #2705

This PR adds the pull down to reload to call the view model and invoke the API. The component used for the pull down is called CustomRefreshControl, which extends the system UIRefreshControl. The instance is set to the table view property refreshControl and it's not manually added as subview.

This because the PCRefreshControl does some computations to the scroll view edge inset which interferes with the view controller and its custom navigation bar and search controller.

IWAGE5365.MOV

To test

  • Make sure you have the FF podcastFeedUpdate enabled
  • Open a podcast detail
  • Pull down to reload
  • Even here the view model simulates the response
  • Confirm the UI is correct and the label correctly updates

Checklist

  • I have considered if this change warrants user-facing release notes and have added them to CHANGELOG.md if necessary.
  • I have considered adding unit tests for my changes.
  • I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.

@danielebogo danielebogo added this to the 7.82 milestone Jan 30, 2025
@danielebogo danielebogo requested a review from a team as a code owner January 30, 2025 13:51

private func setupLayout() {
refreshLabel.translatesAutoresizingMaskIntoConstraints = false
refreshLabel.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you prefer to do NSLayoutConstraint.activate([...]) instead of one by one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do but I kept the same as the other component

Copy link
Contributor

@SergioEstevao SergioEstevao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All working great and looking good!

Just left a small nit regarding code layout, feel free to ignore.

@danielebogo danielebogo merged commit 3fe60ae into trunk Feb 3, 2025
5 of 8 checks passed
@danielebogo danielebogo deleted the danieleb/PFR-2703/2705-pull-down-reload branch February 3, 2025 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Pull down to reload
2 participants