Zhuinden / simple-stack

[ACTIVE] Simple Stack, a backstack library / navigation framework for simpler navigation and state management (for fragments, views, or whatevers).
Apache License 2.0
1.37k stars 75 forks source link

Verify that the new `setParentServices()`'s `lookupFromScope(..., EXPLICIT)` behavior is what is expected #277

Closed Zhuinden closed 3 months ago

Zhuinden commented 1 year ago

Currently, all service lookup done to the parent services (added in https://github.com/Zhuinden/simple-stack/commit/9019ceab30c0cb088d2114bfc2bbb7db0d5f476a ) is done with ALL, even if you passed EXPLICIT.

On one hand, passing EXPLICIT up would make sense, as that's what you received.

On the other hand, knowing that you can't pass up ALL would mean your child stack knows a bit too much about what scopes are available in the parent, whom you should be treating as a black box.

I can technically argue for both sides, so I made it unified and it just does a "lookup from provided scope", where the default has always been ALL.

Zhuinden commented 3 months ago

Nobody has complained.