[android] Reset DialogDone listener after screen rotation

This commit is contained in:
Alexey Osminin 2020-10-29 11:25:33 +03:00 committed by Alexander Boriskov
parent e0f4b3012a
commit d271432271
2 changed files with 10 additions and 1 deletions

View file

@ -430,6 +430,11 @@ public abstract class BaseNewsFragment extends BaseMwmDialogFragment
return mListener;
}
void resetListener(@Nullable NewsDialogListener listener)
{
mListener = listener;
}
public interface NewsDialogListener
{
void onDialogDone();

View file

@ -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();