ConfigActivity: Fix condition for inserting back stack entries

Fixes saved editor state on rotation (removing and recreating the editor
discarded changes).

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Samuel Holland 2017-08-24 01:47:12 -05:00
parent c0a76f87da
commit 881ad4fd47

View File

@ -63,7 +63,8 @@ public class ConfigActivity extends BaseConfigActivity {
}
}
// Now build up intermediate entries in the back stack as necessary.
if (TAG_EDIT.equals(tag) && !TAG_DETAIL.equals(visibleFragmentTag))
if (TAG_EDIT.equals(tag) && !TAG_EDIT.equals(visibleFragmentTag) &&
!TAG_DETAIL.equals(visibleFragmentTag))
moveToFragment(config, TAG_DETAIL);
// Finally, set the main container's content to the new top-level fragment.
if (tag == null) {