fix: Resolve correct transfer direction for API v2 deeplink#632
Open
sirambd wants to merge 1 commit intofix-apiv2-deeplinkfrom
Open
fix: Resolve correct transfer direction for API v2 deeplink#632sirambd wants to merge 1 commit intofix-apiv2-deeplinkfrom
sirambd wants to merge 1 commit intofix-apiv2-deeplinkfrom
Conversation
|
This PR/issue depends on:
|
745b87a to
d0ab7f6
Compare
f8dcdf8 to
844a794
Compare
47a8a53 to
978b602
Compare
288d9be to
f3779b0
Compare
Determine transfer direction using linkId for API v2 deeplinks instead of UUID, ensuring correct navigation to Sent or Received views.
978b602 to
7fb922d
Compare
|
LunarX
approved these changes
May 1, 2026
There was a problem hiding this comment.
Pull request overview
This PR fixes deeplink navigation for API v2 transfers by determining the transfer direction (Sent vs Received) using the API v2 linkId rather than treating the deeplink identifier as a UUID, ensuring users land on the correct tab/view.
Changes:
- Update
DeeplinkViewModel.getDeeplinkTransferDirectionto query by linkId for API v2 deeplinks and by UUID otherwise. - Update
MainActivityto detect API v2 deeplinks viaApiUrlMatcher.isV2Urland pass that information when resolving transfer direction.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| app/src/main/java/com/infomaniak/swisstransfer/ui/screen/main/DeeplinkViewModel.kt | Adds API v2-aware direction lookup (linkId vs UUID). |
| app/src/main/java/com/infomaniak/swisstransfer/ui/MainActivity.kt | Determines API version from URL and uses it to resolve the correct transfer direction for deeplink routing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+39
to
+42
| suspend fun getDeeplinkTransferDirection(transferUuid: String, isApiV2: Boolean): TransferDirection? { | ||
| return when { | ||
| isApiV2 -> transferManager.getTransferByLinkId(transferUuid)?.direction | ||
| else -> transferManager.getTransferByUUID(transferUuid)?.direction |
Comment on lines
+107
to
+108
| deeplinkTransferDirection = deeplinkViewModel.getDeeplinkTransferDirection( | ||
| transferUuid = deepLinkTypeFromURL.uuid, |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Determine transfer direction using linkId for API v2 deeplinks instead of UUID, ensuring correct navigation to Sent or Received views.
Depends on #631