-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Handle prepod Deeplink #247
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.
After a deeplink, it seems the button in the NavigationRail
does not work anymore. Happens on phone and tablet.
Screen_recording_20241211_163140.mp4
app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transfers/TransfersViewModel.kt
Outdated
Show resolved
Hide resolved
...rc/main/java/com/infomaniak/swisstransfer/ui/screen/main/transfers/TransfersScreenWrapper.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/transfers/TransfersViewModel.kt
Outdated
Show resolved
Hide resolved
...java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/TransferDetailsViewModel.kt
Outdated
Show resolved
Hide resolved
...rc/main/java/com/infomaniak/swisstransfer/ui/screen/main/transfers/TransfersScreenWrapper.kt
Outdated
Show resolved
Hide resolved
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.
Seems like it doesn't work if the app is already open.
Also what is the wanted behaviour for the link ? shouldn't it stay in the "received" list afterhand ? Here it disappear when backing
app/src/main/java/com/infomaniak/swisstransfer/ui/navigation/NavigationDestination.kt
Show resolved
Hide resolved
app/src/main/java/com/infomaniak/swisstransfer/ui/navigation/NavigationDestination.kt
Show resolved
Hide resolved
app/src/main/java/com/infomaniak/swisstransfer/ui/navigation/NavigationDestination.kt
Show resolved
Hide resolved
app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/components/MainScaffold.kt
Outdated
Show resolved
Hide resolved
val currentBackStackEntry = [email protected] | ||
val hasDeepLink = currentBackStackEntry?.arguments?.parcelableExtra<Intent>(NavController.KEY_DEEP_LINK_INTENT) != null | ||
val isNavigateToStartDestination = startDestination.route == destination::class.qualifiedName | ||
restoreState = !hasDeepLink || !isNavigateToStartDestination |
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 break the Ui of the "sent" destination by creating a huge blink as Sent
is the startDestination
...java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/TransferDetailsViewModel.kt
Outdated
Show resolved
Hide resolved
...java/com/infomaniak/swisstransfer/ui/screen/main/transferdetails/TransferDetailsViewModel.kt
Show resolved
Hide resolved
…plink from bottombar
Those are needed only if the given lambda reads another state. It wasn't the case here, hence the removal. This commit also introduces a single-use private function that helps clarify that we want to show navigation while we're in a top-level destination.
This simplifies the code a little bit, and saves a few CPU cycles.
Co-authored-by: Fabian Devel <[email protected]>
Co-authored-by: Fabian Devel <[email protected]>
|
No description provided.