forked from organicmaps/organicmaps
[android] Reset DialogDone listener after screen rotation
This commit is contained in:
parent
e0f4b3012a
commit
d271432271
2 changed files with 10 additions and 1 deletions
|
@ -430,6 +430,11 @@ public abstract class BaseNewsFragment extends BaseMwmDialogFragment
|
|||
return mListener;
|
||||
}
|
||||
|
||||
void resetListener(@Nullable NewsDialogListener listener)
|
||||
{
|
||||
mListener = listener;
|
||||
}
|
||||
|
||||
public interface NewsDialogListener
|
||||
{
|
||||
void onDialogDone();
|
||||
|
|
|
@ -124,7 +124,11 @@ public class NewsFragment extends BaseNewsFragment implements AlertDialogCallbac
|
|||
|
||||
f = fm.findFragmentByTag(NewsFragment.class.getName());
|
||||
if (f != null)
|
||||
return true;
|
||||
{
|
||||
NewsFragment newsFragment = (NewsFragment) f;
|
||||
newsFragment.resetListener(listener);
|
||||
return true;
|
||||
}
|
||||
|
||||
String currentTitle = getCurrentTitleConcatenation(activity.getApplicationContext());
|
||||
String oldTitle = SharedPropertiesUtils.getWhatsNewTitleConcatenation();
|
||||
|
|
Loading…
Add table
Reference in a new issue