-
Notifications
You must be signed in to change notification settings - Fork 70
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
currentNavigable #255
currentNavigable #255
Conversation
… currentNavigable.
5fbbb1f
to
1182840
Compare
@@ -3,4 +3,6 @@ package com.wealthfront.magellan.navigation | |||
import com.wealthfront.magellan.core.Displayable | |||
import com.wealthfront.magellan.lifecycle.LifecycleAware | |||
|
|||
public interface NavigableCompat : LifecycleAware, Displayable | |||
public interface NavigableCompat : LifecycleAware, Displayable { | |||
public val currentNavigable: NavigableCompat get() = this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm why is this method on Navigable instead of Navigator? Please don't tell me it's because of LazySetNavigator 😩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I see - it lets us avoid reflection when sifting thru backstacks. We can just treat all Navigables equally i.e. without filtering for Navigators only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, and this also allows the application developer to define current screen when it's otherwise undefined. Example: a Step containing two "sibling" Journeys doesn't have a well-defined "current" screen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly. I could imagine a master-detail arrangement, where an application developer would have a better sense of what the "current" navigable is
Removes global CurrentNavigableProvider for recursive, scoped currentNavigable.
#254