-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add predictive back support for iOS #1432
base: jb-main
Are you sure you want to change the base?
Conversation
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.
Thanks for a contribution.
But this approach won't work and cannot be merged. A few issues here:
- Changes in Android in fork
- A few new common public APIs
- Adding APIs in modules that they shouldn't belong to
All of these are blockers - we cannot do such changes in the fork (we do not publish android binaries).
We're in the process with colleagues from Google to make this feature happen, but currently there is no decision about the shape of common public APIs. So once unblocked, I'll use this as a reference (if you're OK with it), but I cannot accept this PR as-is
/** | ||
* Compat around the BackEvent class | ||
*/ | ||
class BackEventCompat @VisibleForTesting constructor( |
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.
We shouldn't introduce a new public classes on Android
import kotlinx.coroutines.flow.onCompletion | ||
import kotlinx.coroutines.launch | ||
|
||
val LocalBackEventHandler = staticCompositionLocalOf<BackEventHandler> { |
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.
Adding public common API in fork won't work - we do NOT re-compile/publish android artifact but using binary redirection to original Google's library instead
import kotlinx.coroutines.flow.Flow | ||
|
||
@Composable | ||
expect fun PredictiveBackHandler( |
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.
It shouldn't be placed as part of this module because BackHandler
logic is also handled in non-compose navigation modules.
(+ another common API)
This makes sense @MatkovIvan |
Added predictive back support for iOS which in turn allows it to work in navigation
Testing
I tested thoroughly on a sample project on both iOS and Android
This should be tested by QA
Release Notes
Feature - iOS
Google CLA
You need to sign the Google Contributor’s License Agreement at https://cla.developers.google.com/.
This is needed since we synchronise most of the code with Google’s AOSP repository. Signing this agreement allows us to synchronise code from your Pull Requests as well.