[android] Fix bookmark edits not updating in PP on screen rotation

Resolves #2418

Signed-off-by: savsch <119003089+savsch@users.noreply.github.com>
This commit is contained in:
savsch
2025-02-15 17:28:38 +05:30
committed by Konstantin Pastbin
parent daab819110
commit 362154aedb
2 changed files with 9 additions and 1 deletions

View File

@@ -193,6 +193,14 @@ public class EditBookmarkFragment extends BaseMwmDialogFragment implements View.
} }
} }
@Override
public void onAttach(@NonNull Context context)
{
super.onAttach(context);
if (mListener == null && getParentFragment() instanceof EditBookmarkListener)
mListener = (EditBookmarkListener) getParentFragment();
}
private void initToolbar(View view) private void initToolbar(View view)
{ {
Toolbar toolbar = view.findViewById(R.id.toolbar); Toolbar toolbar = view.findViewById(R.id.toolbar);

View File

@@ -127,7 +127,7 @@ public class PlacePageBookmarkFragment extends Fragment implements View.OnClickL
EditBookmarkFragment.editBookmark(currentBookmark.getCategoryId(), EditBookmarkFragment.editBookmark(currentBookmark.getCategoryId(),
currentBookmark.getBookmarkId(), currentBookmark.getBookmarkId(),
activity, activity,
activity.getSupportFragmentManager(), getChildFragmentManager(),
PlacePageBookmarkFragment.this); PlacePageBookmarkFragment.this);
} }