I have a hierarchy consisting of 4 depth levels. My profile has a 2nd hierarchy level, which means that when you click on a profile, you always need to return the user to the 1st hierarchy level.
My problem is that the profile link is available at all levels; so, for example, if a user located at the 4th level clicks on the profile link, his hierarchy position should be changed to the 2nd level - NOT by the fifth.
I believe that there should be a substantial way to do this. So far I have come up with the combination CLEAR_TOP to the 1st level + if(extra){startActivity(Profile)}
, but this way the activity of the 1st level will be recreated - right? and therefore I want you to offer something better.
Thanks guys:)
UPD: just a little clarification: there might not be a profile instance, so just clearing the top will not work in this case.
source share