Skip to content

fix: Resolve correct transfer direction for API v2 deeplink#632

Open
sirambd wants to merge 1 commit intofix-apiv2-deeplinkfrom
fix-apiv2-deeplink-direction
Open

fix: Resolve correct transfer direction for API v2 deeplink#632
sirambd wants to merge 1 commit intofix-apiv2-deeplinkfrom
fix-apiv2-deeplink-direction

Conversation

@sirambd
Copy link
Copy Markdown
Member

@sirambd sirambd commented Apr 30, 2026

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

Depends on #631

@github-actions
Copy link
Copy Markdown

This PR/issue depends on:

@sirambd sirambd force-pushed the fix-apiv2-deeplink-direction branch from 745b87a to d0ab7f6 Compare April 30, 2026 10:17
@sirambd sirambd force-pushed the fix-apiv2-deeplink branch from f8dcdf8 to 844a794 Compare April 30, 2026 11:11
@sirambd sirambd force-pushed the fix-apiv2-deeplink-direction branch 2 times, most recently from 47a8a53 to 978b602 Compare May 1, 2026 08:49
@sirambd sirambd force-pushed the fix-apiv2-deeplink branch from 288d9be to f3779b0 Compare May 1, 2026 12:49
Determine transfer direction using linkId for API v2 deeplinks
instead of UUID, ensuring correct navigation to Sent or Received views.
@sirambd sirambd force-pushed the fix-apiv2-deeplink-direction branch from 978b602 to 7fb922d Compare May 1, 2026 12:49
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.getDeeplinkTransferDirection to query by linkId for API v2 deeplinks and by UUID otherwise.
  • Update MainActivity to detect API v2 deeplinks via ApiUrlMatcher.isV2Url and 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,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants