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(amplify_datastore): avoid tearing down iOS subscription after clear() #399

Merged
merged 3 commits into from
Mar 1, 2021

Conversation

Amplifiyer
Copy link
Contributor

Issue #, if available: fixes #395

Description of changes: fix(amplify_datastore): avoid tearing down iOS subscription after clear()

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Amplifiyer Amplifiyer requested a review from a team February 20, 2021 00:23
@kjones
Copy link

kjones commented Feb 20, 2021

Pulled this branch locally and it fixed my test app linked to in #395 so 👍🏻 👍🏻 from me.

@codecov
Copy link

codecov bot commented Feb 20, 2021

Codecov Report

Merging #399 (41bd0ff) into master (78c862a) will increase coverage by 0.01%.
The diff coverage is 88.88%.

@@            Coverage Diff             @@
##           master     #399      +/-   ##
==========================================
+ Coverage   67.94%   67.95%   +0.01%     
==========================================
  Files         240      240              
  Lines        7471     7478       +7     
  Branches      323      323              
==========================================
+ Hits         5076     5082       +6     
- Misses       2277     2278       +1     
  Partials      118      118              
Flag Coverage Δ
android-unit-tests 60.15% <ø> (ø)
flutter-unit-tests 59.27% <ø> (ø)
ios-unit-tests 75.34% <88.88%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...tore/ios/Classes/SwiftAmplifyDataStorePlugin.swift 55.07% <88.88%> (+1.07%) ⬆️

@@ -280,6 +284,10 @@ public class SwiftAmplifyDataStorePlugin: NSObject, FlutterPlugin {
flutterResult: flutterResult)
case .success():
print("Successfully cleared the store")
// iOS tears down the publisher after clear. Let's setup again.
// See https://github.com/aws-amplify/amplify-flutter/issues/395
Copy link
Member

Choose a reason for hiding this comment

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

I like citing the GH issue in this way.

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.

DataStore - iOS - observe() stops working after clear()
4 participants