Fix creating list from hamburger menu

This commit is contained in:
Clayton Wilson 2020-10-09 02:15:08 -04:00
parent 24554b50dd
commit 8fa081e4b7

View File

@ -61,6 +61,9 @@ public class CreateListDialogFragment extends DialogFragment {
super.onAttach(context); super.onAttach(context);
try { try {
onNewListListener = (OnNewListListener) getTargetFragment(); onNewListListener = (OnNewListListener) getTargetFragment();
if (onNewListListener == null) {
onNewListListener = (OnNewListListener) getActivity();
}
} catch (ClassCastException e) { } catch (ClassCastException e) {
Log.e("CreateListDialogFragment", "onAttach: ClassCastException: " + e.getMessage()); Log.e("CreateListDialogFragment", "onAttach: ClassCastException: " + e.getMessage());
} }