{"action":"opened","issue":{"url":"https://api.github.com/repos/ncapdevi/FragNav/issues/39","repository_url":"https://api.github.com/repos/ncapdevi/FragNav","labels_url":"https://api.github.com/repos/ncapdevi/FragNav/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/ncapdevi/FragNav/issues/39/comments","events_url":"https://api.github.com/repos/ncapdevi/FragNav/issues/39/events","html_url":"https://github.com/ncapdevi/FragNav/issues/39","id":198666310,"number":39,"title":"Pop to the current fragment in the stack","user":{"login":"zezekalo","id":2778281,"avatar_url":"https://avatars.githubusercontent.com/u/2778281?v=3","gravatar_id":"","url":"https://api.github.com/users/zezekalo","html_url":"https://github.com/zezekalo","followers_url":"https://api.github.com/users/zezekalo/followers","following_url":"https://api.github.com/users/zezekalo/following{/other_user}","gists_url":"https://api.github.com/users/zezekalo/gists{/gist_id}","starred_url":"https://api.github.com/users/zezekalo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zezekalo/subscriptions","organizations_url":"https://api.github.com/users/zezekalo/orgs","repos_url":"https://api.github.com/users/zezekalo/repos","events_url":"https://api.github.com/users/zezekalo/events{/privacy}","received_events_url":"https://api.github.com/users/zezekalo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-04T09:42:53Z","updated_at":"2017-01-04T09:42:53Z","closed_at":null,"body":"I've got a question: if I have a fragment backstack and want to pop to particular fragment in this backstack. Is there any possibility to find this particular fragment and return to this point within current backstack?\r\n\r\nMy code for this:\r\nString accountTag = AccountsFragment.class.getSimpleName();\r\n\t\tAccountsFragment fragment = (AccountsFragment) getSupportFragmentManager().findFragmentByTag(accountTag);\r\n\r\n\t\tif (mainPresenter.hasLocallySavedUsers()) {\r\n\t\t\tif (fragment != null) {\r\n\t\t\t\tgetSupportFragmentManager().popBackStackImmediate(accountTag, 0);\r\n\t\t\t} else {\r\n\t\t\t\tString welcomeTag = WelcomeFragment.class.getSimpleName();\r\n\t\t\t\tWelcomeFragment welcomeFragment = (WelcomeFragment) getSupportFragmentManager().findFragmentByTag(welcomeTag);\r\n\t\t\t\tif (welcomeFragment != null) {\r\n\t\t\t\t\tgetSupportFragmentManager().popBackStackImmediate(welcomeTag, 0);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstartAccounts(accountsButton);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tstartAccounts(accountsButton);\r\n\t\t}"}}
{"actor":{"display_login":"zezekalo"}}