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

Subscriptions: Fix thread issue on Subscription Restore #2719

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

afterxleep
Copy link
Collaborator

@afterxleep afterxleep commented Apr 11, 2024

Task/Issue URL: https://app.asana.com/0/1204099484721401/1207054737385929/f

Description:
There is a threading issue on deInit for the SubscriptionFlow and SubscriptionRestore Viewmodels causing simultaneous calls to cleanup() in the SubFeature. (While I was unable to reproduce the issue, it’s there.)

Since subFeature is now a single instance everywhere, this adds a new ViewModel that holds and cleans the subFeature object instead of delegating the tasks to the internal viewModels.

Screenshot 2024-04-11 at 13 11 54

Steps to test this PR:

  1. Get a subscription
  2. Close settings
  3. Remove from device and restore again
  4. Close settings

Internal references:

Software Engineering Expectations
Technical Design Template

@github-actions github-actions bot added the bot: not in app board Added by automation for pull requests with tasks not added to iOS App Board Asana project label Apr 11, 2024
@afterxleep afterxleep changed the title Subscriptions: Fix potential crash on restore Subscriptions: Fix thread issue on Subscription Restore Apr 11, 2024
@afterxleep afterxleep removed the bot: not in app board Added by automation for pull requests with tasks not added to iOS App Board Asana project label Apr 11, 2024
@afterxleep afterxleep merged commit 44e61af into main Apr 12, 2024
35 of 38 checks passed
@afterxleep afterxleep deleted the daniel/subscription.container.crash.fix branch April 12, 2024 10:34
samsymons added a commit that referenced this pull request Apr 15, 2024
# By Daniel Bernal (33) and others
# Via Mariusz Śpiewak (5) and others
* main: (245 commits)
  Fix inconsistent bars state when scrolling (#2733)
  fix tests (#2732)
  Release 7.115.0-4 (#2729)
  Fix VPN denial prompt loop (#2728)
  Small UI Fixes for subscriptions (#2690)
  SPM updated: SwiftSoup, Lottie, ZIPFoundation (#2724)
  Release 7.115.0-3 (#2727)
  VPN: Specific TunnelController start failure reporting (#2714)
  update bsk dependency (#2725)
  Subscriptions: Fix thread issue on Subscription Restore (#2719)
  Manage ‘Stale’ PRs (#2723)
  maestro: hide dax dialogs if visible and cancel keyboard after fireproof (#2695)
  Remove timezone offset from the VPN server object (#2701)
  Reverting accidental push to main (#2718)
  Add SubscriptionContainerViewModel and
  Manually hide loader + Pixel (#2687)
  Release 7.115.0-2 (#2712)
  soft revert history suggestions (#2711)
  Bring back accessibility identifiers for onboarding buttons (#2709)
  BSK release 133.1.0 (#2708)
  ...

# Conflicts:
#	Core/Pixel.swift
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