-
Notifications
You must be signed in to change notification settings - Fork 247
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
Conversation
packages/amplify_datastore/ios/Classes/SwiftAmplifyDataStorePlugin.swift
Outdated
Show resolved
Hide resolved
…ugin.swift Co-authored-by: Michael Law <[email protected]>
Pulled this branch locally and it fixed my test app linked to in #395 so 👍🏻 👍🏻 from me. |
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -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 |
There was a problem hiding this comment.
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.
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.