-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Allow quick_actions to register more than once #783
Conversation
cc @mehmetf can you take a look to see if this patch makes sense? |
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.
This plugin is unique in the sense that no other plugin expects Android system to build an activity to interact with it (UrlLauncher comes close but does not expect to post anything to the channel).
I believe this is safe in the current embedder since the system is supposed to construct a new activity in the UI thread and we override the _channel value when the application is initialized. However, if we allow this plugin to be registered anywhere else, there's a risk that the activity will be constructed before the channel's value is set.
.../quick_actions/android/src/main/java/io/flutter/plugins/quickactions/QuickActionsPlugin.java
Show resolved
Hide resolved
.../quick_actions/android/src/main/java/io/flutter/plugins/quickactions/QuickActionsPlugin.java
Show resolved
Hide resolved
@Cretezy please take a look at my comments. We can merge this in after you fix the minor issues I pointed out. |
@mehmetf I applied your suggestions. Let me know if everything is okay! |
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.
LGTM! Just fix the failing tests and you are good to go.
Please also update changelog and pubspec.yaml. This should be a minor version bump. |
@mehmetf should be good to go! Also, the failing build before was for formatting, not the ipas/git |
@mehmetf Hey guys, As I can see - currently a lot of plugins are outdated - changes are merged to plugins but new version are not published. Please fix that ) |
Done! Sorry about that. |
@mehmetf thank you a lot ;) |
This reverts commit c140f3e.
flutter/flutter#18864