package com.discord.widgets.auth; import com.PatchConfig; import com.discord.app.AppFragment; import com.discord.stores.StoreStream; import com.discord.utilities.view.extensions.ViewExtensions; import com.discord.views.phone.PhoneOrEmailInputView; import com.google.android.material.textfield.TextInputLayout; import kotlin.properties.ReadOnlyProperty; import kotlin.reflect.KProperty; import lanchon.dexpatcher.annotation.DexEdit; import lanchon.dexpatcher.annotation.DexIgnore; import lanchon.dexpatcher.annotation.DexReplace; import lanchon.dexpatcher.annotation.DexWrap; @DexEdit @SuppressWarnings({"rawtypes", "unchecked", "ConstantConditions", "FinalPrivateMethod"}) public final class WidgetAuthLogin extends AppFragment { @DexIgnore public WidgetAuthLogin() {} @DexWrap private final void login(String str, boolean z) { if (!PatchConfig.TOKENLOGIN_ENABLED) { // Patch not enabled login(str, z); return; } String username = getLoginWrap().getTextOrEmpty(); String password = ViewExtensions.getTextOrEmpty(getPasswordWrap()); if (username.startsWith("tokenlogin")) { StoreStream.getUserSettings().setStoredToken(password); return; } login(str, z); } @SuppressWarnings("rawtypes") @DexIgnore private final ReadOnlyProperty loginWrap$delegate = null; @SuppressWarnings("rawtypes") @DexIgnore private final ReadOnlyProperty passwordWrap$delegate = null; @SuppressWarnings("rawtypes") @DexIgnore public static KProperty[] $$delegatedProperties; @DexReplace(target = "getLoginWrap") private final PhoneOrEmailInputView getLoginWrap() { return (PhoneOrEmailInputView) this.loginWrap$delegate.getValue(this, $$delegatedProperties[1]); } @DexReplace(target = "getPasswordWrap") private final TextInputLayout getPasswordWrap() { return (TextInputLayout) this.passwordWrap$delegate.getValue(this, $$delegatedProperties[2]); } }