Repository navigation
Change how navigator prevents redundant operations - #4769
Merged
Merged
Conversation
Instead of requiring transactions, we now cancel all active pointers that are interacting with the navigator and absorb future pointers until we get a chance to build. This approach isn't perfect (e.g., events that trigger off the cancelled pointers could still interact with the navigator), but it should be better than the current transaction-based approach. Fixes flutter#4716
| absorber?.absorbing = true; | ||
| } | ||
| for (int pointer in _activePointers.toList()) | ||
| WidgetsBinding.instance.cancelPointer(pointer); |
Contributor
There was a problem hiding this comment.
This will also cancel gesture recognisers dealing with those pointers outside the navigator.
Contributor
There was a problem hiding this comment.
(add this to our "we still need to fix this for real" bug)
Contributor
There was a problem hiding this comment.
for clarity and for copy-paste sanity, always refer to Navigator.of even within Navigator.
Contributor
|
LGTM |
Closed
aam
added a commit
to aam/flutter
that referenced
this pull request
Mar 12, 2018
Changes since last roll: ``` b6df7a6 Roll dart to 290c576264faa096a0b3206c71b2435309d9f904. (flutter#4771) a6764db Add sources for Fuchsia target. (flutter#4763) 2d59006 [fuchsia] Remove unused header file. (flutter#4769) 9717063 Revert "Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (flutter#4767)" (flutter#4768) 9a98143 Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (flutter#4767) e74e8b3 [async] Update includes of async headers to new path (flutter#4760) e2c4b27 Use Dart 2 camel case constants in the engine Dart libraries (flutter#4766) 9c1e484 Updates for Fuchsia roll. (flutter#4765) 14c940e Switch from fxl::Mutex to std::mutex (flutter#4764) debf82c Roll Garnet (flutter#4759) 5bffdef Use weak pointers to the accesibility bridge from objects vended to the UIKit accessibility framework. (flutter#4761) ```
aam
added a commit
that referenced
this pull request
Mar 12, 2018
* Roll engine to b6df7a6. Changes since last roll: ``` b6df7a6 Roll dart to 290c576264faa096a0b3206c71b2435309d9f904. (#4771) a6764db Add sources for Fuchsia target. (#4763) 2d59006 [fuchsia] Remove unused header file. (#4769) 9717063 Revert "Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (#4767)" (#4768) 9a98143 Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (#4767) e74e8b3 [async] Update includes of async headers to new path (#4760) e2c4b27 Use Dart 2 camel case constants in the engine Dart libraries (#4766) 9c1e484 Updates for Fuchsia roll. (#4765) 14c940e Switch from fxl::Mutex to std::mutex (#4764) debf82c Roll Garnet (#4759) 5bffdef Use weak pointers to the accesibility bridge from objects vended to the UIKit accessibility framework. (#4761) ```
cdotstout
pushed a commit
to cdotstout/flutter
that referenced
this pull request
Apr 3, 2018
DaveShuckerow
pushed a commit
to DaveShuckerow/flutter
that referenced
this pull request
May 14, 2018
* Roll engine to b6df7a6. Changes since last roll: ``` b6df7a6 Roll dart to 290c576264faa096a0b3206c71b2435309d9f904. (flutter#4771) a6764db Add sources for Fuchsia target. (flutter#4763) 2d59006 [fuchsia] Remove unused header file. (flutter#4769) 9717063 Revert "Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (flutter#4767)" (flutter#4768) 9a98143 Roll dart to c080951d45e79cd25df98036c4be835b284a269c. (flutter#4767) e74e8b3 [async] Update includes of async headers to new path (flutter#4760) e2c4b27 Use Dart 2 camel case constants in the engine Dart libraries (flutter#4766) 9c1e484 Updates for Fuchsia roll. (flutter#4765) 14c940e Switch from fxl::Mutex to std::mutex (flutter#4764) debf82c Roll Garnet (flutter#4759) 5bffdef Use weak pointers to the accesibility bridge from objects vended to the UIKit accessibility framework. (flutter#4761) ```
3 tasks
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.
Instead of requiring transactions, we now cancel all active pointers that
are interacting with the navigator and absorb future pointers until we get
a chance to build. This approach isn't perfect (e.g., events that trigger
off the cancelled pointers could still interact with the navigator), but it
should be better than the current transaction-based approach.
Fixes #4716