@@ -156,6 +156,31 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
156
156
});
157
157
}
158
158
159
+ binding .shareTextViewPostOptionsBottomSheetFragment .setOnClickListener (view -> {
160
+ Bundle bundle = new Bundle ();
161
+ bundle .putString (ShareBottomSheetFragment .EXTRA_POST_LINK , mPost .getPermalink ());
162
+ if (mPost .getPostType () != Post .TEXT_TYPE ) {
163
+ bundle .putInt (ShareBottomSheetFragment .EXTRA_MEDIA_TYPE , mPost .getPostType ());
164
+ switch (mPost .getPostType ()) {
165
+ case Post .IMAGE_TYPE :
166
+ case Post .GIF_TYPE :
167
+ case Post .LINK_TYPE :
168
+ case Post .NO_PREVIEW_LINK_TYPE :
169
+ bundle .putString (ShareBottomSheetFragment .EXTRA_MEDIA_LINK , mPost .getUrl ());
170
+ break ;
171
+ case Post .VIDEO_TYPE :
172
+ bundle .putString (ShareBottomSheetFragment .EXTRA_MEDIA_LINK , mPost .getVideoDownloadUrl ());
173
+ break ;
174
+ }
175
+ }
176
+ bundle .putParcelable (ShareBottomSheetFragment .EXTRA_POST , mPost );
177
+ ShareBottomSheetFragment shareBottomSheetFragment = new ShareBottomSheetFragment ();
178
+ shareBottomSheetFragment .setArguments (bundle );
179
+ shareBottomSheetFragment .show (mBaseActivity .getSupportFragmentManager (), shareBottomSheetFragment .getTag ());
180
+
181
+ dismiss ();
182
+ });
183
+
159
184
binding .addToPostFilterTextViewPostOptionsBottomSheetFragment .setOnClickListener (view -> {
160
185
Intent intent = new Intent (mBaseActivity , PostFilterPreferenceActivity .class );
161
186
intent .putExtra (PostFilterPreferenceActivity .EXTRA_POST , mPost );
@@ -184,31 +209,6 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
184
209
dismiss ();
185
210
});
186
211
187
- binding .shareTextViewPostOptionsBottomSheetFragment .setOnClickListener (view -> {
188
- Bundle bundle = new Bundle ();
189
- bundle .putString (ShareBottomSheetFragment .EXTRA_POST_LINK , mPost .getPermalink ());
190
- if (mPost .getPostType () != Post .TEXT_TYPE ) {
191
- bundle .putInt (ShareBottomSheetFragment .EXTRA_MEDIA_TYPE , mPost .getPostType ());
192
- switch (mPost .getPostType ()) {
193
- case Post .IMAGE_TYPE :
194
- case Post .GIF_TYPE :
195
- case Post .LINK_TYPE :
196
- case Post .NO_PREVIEW_LINK_TYPE :
197
- bundle .putString (ShareBottomSheetFragment .EXTRA_MEDIA_LINK , mPost .getUrl ());
198
- break ;
199
- case Post .VIDEO_TYPE :
200
- bundle .putString (ShareBottomSheetFragment .EXTRA_MEDIA_LINK , mPost .getVideoDownloadUrl ());
201
- break ;
202
- }
203
- }
204
- bundle .putParcelable (ShareBottomSheetFragment .EXTRA_POST , mPost );
205
- ShareBottomSheetFragment shareBottomSheetFragment = new ShareBottomSheetFragment ();
206
- shareBottomSheetFragment .setArguments (bundle );
207
- shareBottomSheetFragment .show (mBaseActivity .getSupportFragmentManager (), shareBottomSheetFragment .getTag ());
208
-
209
- dismiss ();
210
- });
211
-
212
212
if (mPost .isHidden ()) {
213
213
binding .hidePostTextViewPostOptionsBottomSheetFragment .setText (R .string .action_unhide_post );
214
214
} else {
0 commit comments