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

[YiR] Fix Explore profile button #5059

Merged
merged 4 commits into from
Nov 8, 2024
Merged

[YiR] Fix Explore profile button #5059

merged 4 commits into from
Nov 8, 2024

Conversation

tonisevener
Copy link
Collaborator

Phabricator: N/A

Notes

This PR fixes a race condition that I think only appeared once #5044 and #5056 were merged.

I noticed that ExploreViewController's lazy yirCoordinator was stuck with nil, because it's yirDataController would throw a coreDataStoreUnavailable error upon instantiation. Likely when a YearInReviewDataController is instantiated early on in the app lifecycle, the core data store isn't ready yet. Adjusting these a bit to make the yirDataController computed on Explore and Article (so that it tries again each time), and relaxing the laziness a bit for yirCoordinator, seems to help.

Test Steps

  1. Fresh install app in correct device region with. correct device language. Confirm Explore profile button tap works.
  2. Enable YiR feature flag. Background, foreground. Leave Explore tab and come back. Confirm feature announcement and badge appear. Confirm tapping into intro slide clears out badge as it did before. Confirm survey still presents after the last slide.
  3. Repeat steps 1-2 for Article view.

@tonisevener tonisevener requested review from a team and mazevedofs and removed request for a team November 7, 2024 22:17
Copy link
Collaborator

@mazevedofs mazevedofs left a comment

Choose a reason for hiding this comment

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

Looks good! This bug makes me wonder if we might need to rethink our coordinator lifecycle management soon

@mazevedofs mazevedofs merged commit a0a1c4b into main Nov 8, 2024
4 checks passed
@mazevedofs mazevedofs deleted the yir-profile-button-fix branch November 8, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants