-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[cloud_firestore] Invoke on ui thread only #1701
Conversation
| 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"; |
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.
Should be mentioned in changelog
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.
Done
| @@ -1,3 +1,9 @@ | |||
| ## 0.12.2 | |||
|
|
|||
| * Ensure that all channel calls to the Dart side from the Java side are done | |||
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.
You may want to mention that this is an Android-only change.
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.
Done
| * 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this take into account that Firestore's Android SDK will not allow transactions on the UI thread?
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.
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 |
* Java channel calls on UI thread * Update registrar version string
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