File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -509,8 +509,13 @@ public static void openCommentRepliesFragment(@NonNull final FragmentActivity ac
509509 .commit ();
510510 }
511511
512- // This removes all of the top CommentRepliesFragment instances.
513- // Ideally there should only be one since we remove existing before opening a new one.
512+ /**
513+ * Closes all open {@link CommentRepliesFragment}s in {@code activity},
514+ * including those that are not at the top of the back stack.
515+ * This is needed to prevent multiple open CommentRepliesFragments
516+ * Ideally there should only be one since we remove existing before opening a new one.
517+ * @param activity the activity in which to close the CommentRepliesFragments
518+ */
514519 public static void closeCommentRepliesFragments (@ NonNull final FragmentActivity activity ) {
515520 final FragmentManager fm = activity .getSupportFragmentManager ();
516521
You can’t perform that action at this time.
0 commit comments