@@ -181,15 +181,16 @@ public Holder(Activity activity, ViewGroup parent){
181
181
final Bundle args =new Bundle ();
182
182
args .putString ("account" , item .parentFragment .getAccountID ());
183
183
args .putParcelable ("editStatus" , Parcels .wrap (item .status ));
184
- if (id ==R .id .delete_and_redraft ) {
184
+ boolean redraft = id ==R .id .delete_and_redraft ;
185
+ if (redraft ) {
185
186
args .putBoolean ("redraftStatus" , true );
186
187
if (item .parentFragment instanceof ThreadFragment thread && !thread .isItemEnabled (item .status .id )) {
187
188
// ("enabled" = clickable; opened status is not clickable)
188
189
// request navigation to the re-drafted status if status is currently opened
189
190
args .putBoolean ("navigateToStatus" , true );
190
191
}
191
192
}
192
- if (TextUtils .isEmpty (item .status .content ) && TextUtils .isEmpty (item .status .spoilerText )){
193
+ if (! redraft && TextUtils .isEmpty (item .status .content ) && TextUtils .isEmpty (item .status .spoilerText )){
193
194
Nav .go (item .parentFragment .getActivity (), ComposeFragment .class , args );
194
195
}else if (item .scheduledStatus !=null ){
195
196
args .putString ("sourceText" , item .status .text );
@@ -204,7 +205,7 @@ public Holder(Activity activity, ViewGroup parent){
204
205
public void onSuccess (GetStatusSourceText .Response result ){
205
206
args .putString ("sourceText" , result .text );
206
207
args .putString ("sourceSpoiler" , result .spoilerText );
207
- if (id == R . id . delete_and_redraft ) {
208
+ if (redraft ) {
208
209
UiUtils .confirmDeletePost (item .parentFragment .getActivity (), item .parentFragment .getAccountID (), item .status , s ->{
209
210
Nav .go (item .parentFragment .getActivity (), ComposeFragment .class , args );
210
211
}, true );
0 commit comments