diff options
Diffstat (limited to '')
2 files changed, 9 insertions, 12 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentAndPostRecyclerViewAdapter.java index 6a4dc4db..7c57517d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentAndPostRecyclerViewAdapter.java @@ -229,8 +229,6 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy private Drawable mCommentIcon; private float mScale; - private ShareLinkBottomSheetFragment mShareLinkBottomSheetFragment; - private CopyTextBottomSheetFragment mCopyTextBottomSheetFragment; private ExoCreator mExoCreator; public CommentAndPostRecyclerViewAdapter(AppCompatActivity activity, CustomThemeWrapper customThemeWrapper, @@ -322,8 +320,9 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy Bundle bundle = new Bundle(); bundle.putString(CopyTextBottomSheetFragment.EXTRA_RAW_TEXT, mPost.getSelfTextPlain()); bundle.putString(CopyTextBottomSheetFragment.EXTRA_MARKDOWN, mPost.getSelfText()); - mCopyTextBottomSheetFragment.setArguments(bundle); - mCopyTextBottomSheetFragment.show(mActivity.getSupportFragmentManager(), mCopyTextBottomSheetFragment.getTag()); + CopyTextBottomSheetFragment copyTextBottomSheetFragment = new CopyTextBottomSheetFragment(); + copyTextBottomSheetFragment.setArguments(bundle); + copyTextBottomSheetFragment.show(mActivity.getSupportFragmentManager(), copyTextBottomSheetFragment.getTag()); return true; }); } @@ -554,8 +553,6 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy DrawableCompat.setTint(mCommentIcon, mPostIconAndInfoColor); } - mShareLinkBottomSheetFragment = new ShareLinkBottomSheetFragment(); - mCopyTextBottomSheetFragment = new CopyTextBottomSheetFragment(); mExoCreator = exoCreator; } @@ -2391,8 +2388,9 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy break; } } - mShareLinkBottomSheetFragment.setArguments(bundle); - mShareLinkBottomSheetFragment.show(mActivity.getSupportFragmentManager(), mShareLinkBottomSheetFragment.getTag()); + ShareLinkBottomSheetFragment shareLinkBottomSheetFragment = new ShareLinkBottomSheetFragment(); + shareLinkBottomSheetFragment.setArguments(bundle); + shareLinkBottomSheetFragment.show(mActivity.getSupportFragmentManager(), shareLinkBottomSheetFragment.getTag()); }); if (mVoteButtonsOnTheRight) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java index 52e25fe5..226d8618 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -193,7 +193,6 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView private NetworkState networkState; private ExoCreator mExoCreator; private Callback mCallback; - private ShareLinkBottomSheetFragment mShareLinkBottomSheetFragment; public PostRecyclerViewAdapter(AppCompatActivity activity, Retrofit oauthRetrofit, Retrofit retrofit, Retrofit gfycatRetrofit, Retrofit redgifsRetrofit, @@ -297,7 +296,6 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView mUserDao = redditDataRoomDatabase.userDao(); mExoCreator = exoCreator; mCallback = callback; - mShareLinkBottomSheetFragment = new ShareLinkBottomSheetFragment(); } } @@ -1117,8 +1115,9 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView break; } } - mShareLinkBottomSheetFragment.setArguments(bundle); - mShareLinkBottomSheetFragment.show(mActivity.getSupportFragmentManager(), mShareLinkBottomSheetFragment.getTag()); + ShareLinkBottomSheetFragment shareLinkBottomSheetFragment = new ShareLinkBottomSheetFragment(); + shareLinkBottomSheetFragment.setArguments(bundle); + shareLinkBottomSheetFragment.show(mActivity.getSupportFragmentManager(), shareLinkBottomSheetFragment.getTag()); } @Override |