|
|
@ -74,6 +74,7 @@ public class ReplyFragment extends DialogFragment { |
|
|
|
private final Reply draft = new Reply(); |
|
|
|
private final Reply draft = new Reply(); |
|
|
|
private boolean shouldSaveDraft = true; |
|
|
|
private boolean shouldSaveDraft = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private boolean gotInitialCaptcha = false; |
|
|
|
private boolean gettingCaptcha = false; |
|
|
|
private boolean gettingCaptcha = false; |
|
|
|
private String captchaChallenge = ""; |
|
|
|
private String captchaChallenge = ""; |
|
|
|
|
|
|
|
|
|
|
@ -203,8 +204,6 @@ public class ReplyFragment extends DialogFragment { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
showCommentCount(); |
|
|
|
showCommentCount(); |
|
|
|
|
|
|
|
|
|
|
|
getCaptcha(); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Logger.e(TAG, "Loadable in ReplyFragment was null"); |
|
|
|
Logger.e(TAG, "Loadable in ReplyFragment was null"); |
|
|
|
closeReply(); |
|
|
|
closeReply(); |
|
|
@ -268,12 +267,6 @@ public class ReplyFragment extends DialogFragment { |
|
|
|
}); |
|
|
|
}); |
|
|
|
captchaInput = (TextView) container.findViewById(R.id.reply_captcha); |
|
|
|
captchaInput = (TextView) container.findViewById(R.id.reply_captcha); |
|
|
|
|
|
|
|
|
|
|
|
if (ChanPreferences.getPassEnabled()) { |
|
|
|
|
|
|
|
((TextView) container.findViewById(R.id.reply_captcha_text)).setText(R.string.pass_using); |
|
|
|
|
|
|
|
container.findViewById(R.id.reply_captcha_container).setVisibility(View.GONE); |
|
|
|
|
|
|
|
container.findViewById(R.id.reply_captcha).setVisibility(View.GONE); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cancelButton = (Button) container.findViewById(R.id.reply_cancel); |
|
|
|
cancelButton = (Button) container.findViewById(R.id.reply_cancel); |
|
|
|
cancelButton.setOnClickListener(new OnClickListener() { |
|
|
|
cancelButton.setOnClickListener(new OnClickListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
@ -313,11 +306,11 @@ public class ReplyFragment extends DialogFragment { |
|
|
|
submitButton.setOnClickListener(new OnClickListener() { |
|
|
|
submitButton.setOnClickListener(new OnClickListener() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onClick(View view) { |
|
|
|
public void onClick(View view) { |
|
|
|
if (page == 0) { |
|
|
|
if (page == 1 || ChanPreferences.getPassEnabled()) { |
|
|
|
flipPage(1); |
|
|
|
|
|
|
|
} else if (page == 1) { |
|
|
|
|
|
|
|
flipPage(2); |
|
|
|
flipPage(2); |
|
|
|
submit(); |
|
|
|
submit(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
flipPage(1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -405,12 +398,11 @@ public class ReplyFragment extends DialogFragment { |
|
|
|
if (flipBack) { |
|
|
|
if (flipBack) { |
|
|
|
flipper.setInAnimation(ViewFlipperAnimations.BACK_IN); |
|
|
|
flipper.setInAnimation(ViewFlipperAnimations.BACK_IN); |
|
|
|
flipper.setOutAnimation(ViewFlipperAnimations.BACK_OUT); |
|
|
|
flipper.setOutAnimation(ViewFlipperAnimations.BACK_OUT); |
|
|
|
flipper.showPrevious(); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
flipper.setInAnimation(ViewFlipperAnimations.NEXT_IN); |
|
|
|
flipper.setInAnimation(ViewFlipperAnimations.NEXT_IN); |
|
|
|
flipper.setOutAnimation(ViewFlipperAnimations.NEXT_OUT); |
|
|
|
flipper.setOutAnimation(ViewFlipperAnimations.NEXT_OUT); |
|
|
|
flipper.showNext(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
flipper.setDisplayedChild(position); |
|
|
|
|
|
|
|
|
|
|
|
if (page == 0) { |
|
|
|
if (page == 0) { |
|
|
|
cancelButton.setText(R.string.cancel); |
|
|
|
cancelButton.setText(R.string.cancel); |
|
|
@ -419,6 +411,11 @@ public class ReplyFragment extends DialogFragment { |
|
|
|
} else if (page == 2) { |
|
|
|
} else if (page == 2) { |
|
|
|
cancelButton.setText(R.string.close); |
|
|
|
cancelButton.setText(R.string.close); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (page == 1 && !gotInitialCaptcha) { |
|
|
|
|
|
|
|
gotInitialCaptcha = true; |
|
|
|
|
|
|
|
getCaptcha(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -608,7 +605,11 @@ public class ReplyFragment extends DialogFragment { |
|
|
|
submitButton.setEnabled(true); |
|
|
|
submitButton.setEnabled(true); |
|
|
|
cancelButton.setEnabled(true); |
|
|
|
cancelButton.setEnabled(true); |
|
|
|
setClosable(true); |
|
|
|
setClosable(true); |
|
|
|
|
|
|
|
if (ChanPreferences.getPassEnabled()) { |
|
|
|
|
|
|
|
flipPage(0); |
|
|
|
|
|
|
|
} else { |
|
|
|
flipPage(1); |
|
|
|
flipPage(1); |
|
|
|
|
|
|
|
} |
|
|
|
getCaptcha(); |
|
|
|
getCaptcha(); |
|
|
|
captchaInput.setText(""); |
|
|
|
captchaInput.setText(""); |
|
|
|
} else if (response.isSuccessful) { |
|
|
|
} else if (response.isSuccessful) { |
|
|
|