You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
presenter is notified of a view event triggered by a button click.
presenter does some long running sync operation.
a new activity must be opened after this long running operation.
the presenter should not hold onto an activity context that may be a member variable in the view event which was originally received.
Possible ways to handle this:
Use the application context and add the new task flag.
• This is bad if you have some central logic for navigating in your app which is in a BaseActivity. We should not hold on to the activity in the view.
Send a state to the view delegate Navigation(uri)
• This is problematic because it's a one time state, it should not really be persisted. What if you rotate or do something that would cause this state to be restored? It's almost like we need some form of SingleUseAction
Propagate states from your presenter. Intercept those states in a fragment or activity. This solves the concern with (1), however it brings about another annoyance. What if you have a presenter that manages several other child presenters. Say you have a dashboard with lots of presenters. Do you really want to clutter your fragment or activity with propagateStatesTo calls just to handle navigation?
The text was updated successfully, but these errors were encountered:
We need a way to handle the following:
Possible ways to handle this:
Use the application context and add the new task flag.
• This is bad if you have some central logic for navigating in your app which is in a
BaseActivity
. We should not hold on to the activity in the view.Send a state to the view delegate
Navigation(uri)
• This is problematic because it's a one time state, it should not really be persisted. What if you rotate or do something that would cause this state to be restored? It's almost like we need some form of
SingleUseAction
Propagate states from your presenter. Intercept those states in a fragment or activity. This solves the concern with (1), however it brings about another annoyance. What if you have a presenter that manages several other child presenters. Say you have a dashboard with lots of presenters. Do you really want to clutter your fragment or activity with
propagateStatesTo
calls just to handle navigation?The text was updated successfully, but these errors were encountered: