Do not crash when opening chapter dialog twice

This commit is contained in:
ByteHamster 2021-11-17 22:34:26 +01:00
parent 51e44c68c8
commit c9829be9f5
1 changed files with 1 additions and 2 deletions

View File

@ -110,9 +110,8 @@ public class CoverFragment extends Fragment {
butNextChapter.setColorFilter(colorFilter);
butPrevChapter.setColorFilter(colorFilter);
descriptionIcon.setColorFilter(colorFilter);
ChaptersFragment chaptersFragment = new ChaptersFragment();
chapterControl.setOnClickListener(v ->
chaptersFragment.show(getChildFragmentManager(), ChaptersFragment.TAG));
new ChaptersFragment().show(getChildFragmentManager(), ChaptersFragment.TAG));
butPrevChapter.setOnClickListener(v -> seekToPrevChapter());
butNextChapter.setOnClickListener(v -> seekToNextChapter());