This repository was archived by the owner on Feb 22, 2023. It is now read-only.
[cloud_firestore] Invoke on ui thread only#1701
Merged
kroikie merged 6 commits intoflutter:masterfrom Jun 4, 2019
Merged
Conversation
collinjackson
approved these changes
Jun 4, 2019
| public class FlutterFirebaseAppRegistrar implements ComponentRegistrar { | ||
| private static final String LIBRARY_NAME = "flutter-firebase_cloud_firestore"; | ||
| private static final String LIBRARY_VERSION = "0.12.1"; | ||
| private static final String LIBRARY_NAME = "flutter-fire-fst"; |
Contributor
There was a problem hiding this comment.
Should be mentioned in changelog
| @@ -1,3 +1,9 @@ | |||
| ## 0.12.2 | |||
|
|
|||
| * Ensure that all channel calls to the Dart side from the Java side are done | |||
Contributor
There was a problem hiding this comment.
You may want to mention that this is an Android-only change.
This was referenced Jun 5, 2019
This was referenced Jun 13, 2019
larssn
reviewed
Jun 19, 2019
| * Ensure that all channel calls to the Dart side from the Java side are done | ||
| on the UI thread. This change allows Transactions to work with upcoming | ||
| Engine restrictions, which require channel calls be made on the UI thread. | ||
|
|
There was a problem hiding this comment.
Does this take into account that Firestore's Android SDK will not allow transactions on the UI thread?
Contributor
Author
There was a problem hiding this comment.
The transaction itself is not being executed on the UI thread, only the message being passed over the channel from native side to Dart side is being done on the UI thread.
|
This does not fix flutter/flutter#18870 |
This was referenced Oct 13, 2019
julianscheel
pushed a commit
to jusst-engineering/plugins
that referenced
this pull request
Mar 11, 2020
* Java channel calls on UI thread * Update registrar version string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In coming versions of the Flutter engine calls to the Dart side from the Java side must be done on the UI thread. The Firestore plugin implements transactions by making calls to the Dart side from the Java side. This change ensures that those calls are made on the UI thread.
Related Issues
Resolves: flutter/flutter#32657