NT-2004: Fix comments and updates screen on Thank You page #1281
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📲 What
Previously, the if a user opened the comments page before backing a project, exited the comments page and then successful completed checkout, the comments page would pop up on top of the Thank you page. This PR fixes that bug so that the comments only appear when the text view is tapped on.
The same thing was happening with the updates page, so I fixed that here the same way.
🤔 Why
When the user successfully completes checkout, an update is sent to an observable in the project view model, which makes a network request to pull the latest project data. This was pushing new data to the observable controlling the comments button clicks, and because an event had already been triggered from the previous button click, this observable was not completed and still open listening for new data to come down the pipeline. This was causing the comments page to pop up on top of the thank you screen.
🛠 How
Rearranged the architecture of this observable to only react when the comments/updates text view is tapped, and to then grab the latest data project/project data available instead of that data triggering the event itself.
👀 See
Comments screen:
Updates screen:
📋 QA
Follow these steps for both updates and comments screen on two separate projects. These are two different flows:
Story 📖
NT-2004: Comments showing on top of "Thank you" screen