Force the new captcha when making threads.

Closes #291
multisite^2
Floens 8 years ago
parent ccb343c4dd
commit 550abaeec1
  1. 3
      Clover/app/src/main/java/org/floens/chan/core/presenter/ReplyPresenter.java
  2. 2
      Clover/app/src/main/java/org/floens/chan/core/settings/ChanSettings.java
  3. 8
      Clover/app/src/main/java/org/floens/chan/ui/layout/ReplyLayout.java
  4. 2
      Clover/app/src/main/res/values/strings.xml

@ -344,6 +344,7 @@ public class ReplyPresenter implements ReplyManager.HttpCallback<ReplyHttpCall>,
callback.setPage(Page.INPUT, animate);
break;
case CAPTCHA:
callback.setCaptchaVersion(ChanSettings.postNewCaptcha.get() || loadable.isCatalogMode());
callback.setPage(Page.CAPTCHA, true);
if (!captchaInited) {
@ -411,6 +412,8 @@ public class ReplyPresenter implements ReplyManager.HttpCallback<ReplyHttpCall>,
void setPage(Page page, boolean animate);
void setCaptchaVersion(boolean newCaptcha);
void initCaptcha(String baseUrl, String siteKey, CaptchaCallback callback);
void resetCaptcha();

@ -188,7 +188,7 @@ public class ChanSettings {
postDefaultName = new StringSetting(p, "preference_default_name", "");
postPinThread = new BooleanSetting(p, "preference_pin_on_post", false);
postNewCaptcha = new BooleanSetting(p, "preference_new_captcha", false);
postNewCaptcha = new BooleanSetting(p, "preference_new_captcha", true);
developer = new BooleanSetting(p, "preference_developer", false);

@ -39,7 +39,6 @@ import org.floens.chan.core.model.ChanThread;
import org.floens.chan.core.model.Loadable;
import org.floens.chan.core.model.Reply;
import org.floens.chan.core.presenter.ReplyPresenter;
import org.floens.chan.core.settings.ChanSettings;
import org.floens.chan.ui.activity.StartActivity;
import org.floens.chan.ui.drawable.DropdownArrowDrawable;
import org.floens.chan.ui.helper.HintPopup;
@ -62,7 +61,7 @@ import static org.floens.chan.utils.AndroidUtils.setRoundItemBackground;
public class ReplyLayout extends LoadView implements View.OnClickListener, AnimationUtils.LayoutAnimationProgress, ReplyPresenter.ReplyPresenterCallback, TextWatcher, ImageDecoder.ImageDecoderCallback, SelectionListeningEditText.SelectionChangedListener {
private ReplyPresenter presenter;
private ReplyLayoutCallback callback;
private boolean newCaptcha = ChanSettings.postNewCaptcha.get();
private boolean newCaptcha;
private View replyInputLayout;
private FrameLayout captchaContainer;
@ -248,6 +247,11 @@ public class ReplyLayout extends LoadView implements View.OnClickListener, Anima
}
}
@Override
public void setCaptchaVersion(boolean newCaptcha) {
this.newCaptcha = newCaptcha;
}
@Override
public void initCaptcha(String baseUrl, String siteKey, CaptchaCallback callback) {
captchaLayout.initCaptcha(baseUrl, siteKey, ThemeHelper.getInstance().getTheme().isLightTheme, callback);

@ -456,7 +456,7 @@ Re-enable this permission in the app settings if you permanently disabled it."</
<string name="setting_save_folder_error_create_folder">Error creating save folder</string>
<string name="setting_folder_pick_ok">Choose</string>
<string name="setting_use_new_captcha">Use the new captcha</string>
<string name="setting_use_new_captcha_description">Enable to use the newer recaptcha.</string>
<string name="setting_use_new_captcha_description">Enable to use the newer recaptcha for thread replies.</string>
<string name="setting_save_original_filename">Save original filename</string>
<string name="setting_save_board_folder">Save images in a board folder</string>
<string name="setting_save_board_folder_description">Create a folder for each board to store images in</string>

Loading…
Cancel
Save