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

Fix refreshing of subscription preference pane when switching between panes #2230

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

miasma13
Copy link
Contributor

@miasma13 miasma13 commented Feb 21, 2024

Task/Issue URL: https://app.asana.com/0/1199230911884351/1206654425458681/f
Tech Design URL:
CC:

Description:
Fix refreshing of subscription preference pane when switching between panes.
Also the task var was not nilled so it was only fired once per viewModel instance.
Additionally the check for the expiry date of subscription was wrong and it preemptively cleared cached entitlements resulting in blinking and refresh for every settings pane switch.

Steps to test this PR:
Please enable "Subscription" logging in the app to see the requests being fired and make a subscription purchase.

  1. Open settings
  2. Select "Privacy Pro" pane
  3. Ensure that the 2 requests for subscription details and entitlements are fired.
  4. Select other settings pane
  5. Repeat steps 2. and 3. and ensure that the label with subscription renewal date and 3 feature cells do not blink (by being cleared and repopulated or enabled/disabled for the cells).

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

@github-actions github-actions bot added the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Feb 21, 2024
@miasma13 miasma13 requested a review from afterxleep February 21, 2024 09:44
@miasma13 miasma13 removed the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Feb 21, 2024
@github-actions github-actions bot added the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Feb 21, 2024
Copy link
Contributor

@afterxleep afterxleep left a comment

Choose a reason for hiding this comment

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

LGTM, 2 requests, no blinking

Screenshot 2024-02-21 at 2 58 17 PM

@miasma13 miasma13 removed the bot: not in app board Added by automation for pull requests with tasks not added to macOS App Board Asana project label Feb 21, 2024
@miasma13 miasma13 merged commit 0ae321b into main Feb 21, 2024
27 of 29 checks passed
@miasma13 miasma13 deleted the michal/fix-subs-pref-refresh branch February 21, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants