Skip to content

Ability to add some meta for Destination #726

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

Open
TemMax opened this issue Mar 19, 2025 · 0 comments
Open

Ability to add some meta for Destination #726

TemMax opened this issue Mar 19, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@TemMax
Copy link

TemMax commented Mar 19, 2025

Hello! Sometimes, I need to wait for the result from some screen with an assigned "action_id." For example:

  1. Screen A opens screen B using navigator.navigate(BDestination(params = BParams(action_id = "123"))).
  2. Screen A waits for the result using:
    bResultRecipient.onNavResult { result -> ... }
  3. Screen B was closed by swipe (for example, it was a bottom sheet)
  4. bResultRecipient will receive the NavResult.Canceled event, but I can't determine which action_id it was

The only possible way to do it for now is to execute this code once on screen start:
navigator.setResult(BResult.Canceled(action_id))

In this case, when the swipe closes the screen, I won't receive a NavResult.Canceled event.

Generally, it looks good, but maybe there are some points that need improvement.

@raamcosta raamcosta added the enhancement New feature or request label May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants