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

[NT-573] Pull to refresh functionality on the Manage/View Pledge screen #956

Merged
merged 5 commits into from
Nov 20, 2019

Conversation

ifbarrera
Copy link
Contributor

@ifbarrera ifbarrera commented Nov 19, 2019

πŸ“² What

Adds a UIRefreshControl to support pull-to-refresh functionality on the Manage/View pledge screen.

πŸ€” Why

So that users have a way to refresh the screen and get the most up to date information regarding their backing.

πŸ›  How

  • adds a UIRefreshControl to the root scroll view
  • hooks up the .valueChanged action on the UIRefreshControl to fetching an updated project in the view model

πŸ‘€ See

EPMwCeQVAY

🏎 Performance

N/A

βœ… Acceptance criteria

  • navigate to the manage pledge screen and pull down to see the refresh icon. The screen should refresh every time you pull it down.

Copy link
Contributor

@justinswart justinswart left a comment

Choose a reason for hiding this comment

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

Great, minor optional suggestions!

self.viewModel.outputs.endRefreshing
.observeForUI()
.observeValues { [weak self] in
self?.rootScrollView.refreshControl?.endRefreshing()
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this could reference self.refreshControl directly πŸ€·β€β™‚ - or seeing as we don't customize it and are able to refer to it through the scrollView we could just set it on the scrollView and not have a property referencing it. Up to you.

@@ -294,6 +311,10 @@ final class ManagePledgeViewController: UIViewController, MessageBannerViewContr
self.viewModel.inputs.menuButtonTapped()
}

@objc private func handleRefreshControl() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could just be refresh() or beginRefresh()

@ifbarrera ifbarrera merged commit 4da6663 into master Nov 20, 2019
@ifbarrera ifbarrera deleted the NT-573-pull-to-refresh-manage branch November 20, 2019 21:42
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.

None yet

2 participants