forked from organicmaps/organicmaps
[android] Added checking auth dialog existing before showing new one
This commit is contained in:
parent
008690313e
commit
677fce4ff0
1 changed files with 6 additions and 1 deletions
|
@ -62,7 +62,12 @@ public class Authorizer implements AuthorizationListener
|
|||
}
|
||||
|
||||
String name = SocialAuthDialogFragment.class.getName();
|
||||
DialogFragment fragment = (DialogFragment) Fragment.instantiate(mFragment.getContext(), name);
|
||||
DialogFragment fragment = (DialogFragment) mFragment.getChildFragmentManager()
|
||||
.findFragmentByTag(name);
|
||||
if (fragment != null)
|
||||
return;
|
||||
|
||||
fragment = (DialogFragment) Fragment.instantiate(mFragment.getContext(), name);
|
||||
// A communication with the SocialAuthDialogFragment is implemented via getParentFragment method
|
||||
// because of 'setTargetFragment' paradigm doesn't survive the activity configuration change
|
||||
// due to this issue https://issuetracker.google.com/issues/36969568
|
||||
|
|
Loading…
Add table
Reference in a new issue