question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

resultRecipient() support for Destinations from other modules when one depends on the other module

See original GitHub issue

Would be awesome if resultRecipient() supported Destinations from other modules when the recipient module depends on the sender.

In the current state, this error is thrown.

Non existent Destination as the ResultRecipient's result origin!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
raamcostacommented, May 21, 2022

Wasn’t able to allow this without losing some type safety at compile time + some manual work when calling DestinationsNavhost. So the fix is not ideal for this particular scenario where the recipient module actually depends on the sender module.

Since I need to have information about the Destination to check if it also contains a correspondently typed result, I didn’t find a better solution. I think I will reopen this however, so I can maybe explore more in the future 😃

In the meantime, I wanted to make this possible even when modules don’t depend on eachother, so that’s why the solution went this way.

1reaction
ildar2commented, Apr 26, 2022

to whom it may concern, my workaround is to make a proxy destination in each module that would be a Destination and use my screen directly:

/**
 * Auxiliary screen to use SearchUserScreen between modules
 * https://github.com/raamcosta/compose-destinations/issues/59
 */
@Composable
@Destination
fun SearchUserProxy(
    resultNavigator: ResultBackNavigator<String>?
) {
    SearchUserScreen(resultNavigator)
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Make Result back feature work between different modules #70
The only workaround is to place CatalogScreen to some common module which could be available in feed . Could be nice to define...
Read more >
Diff - 940801c16579289af2d7e30f675dac14e261c5a9^! - platform ...
Remove packages/Connectivity It has moved to packages/modules/Connectivity BUG: 186628461 TEST: TH Merged-In: I2ed1fb00a7780c488c40d27590f206031fe033f2 ...
Read more >
XmlPullParser - Android Developers
There are following different kinds of parser depending on which features are set ... next() will accumulate the replacement text and other text...
Read more >
Scalable multi-module architecture for Jetpack Compose apps ...
Jetpack Compose, navigation, multi- module architecture, API and Impl modules, dependency injection — in this talk, we will see how these ...
Read more >
Duplicate class android.support.v4.app ... - Stack Overflow
If you want to use androidx -namespaced libraries in a new ... also allowed me to upgrade all other libraries that depend on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found