59 lines
2.7 KiB
Java
59 lines
2.7 KiB
Java
package com.discord.widgets.settings.profile;
|
|
|
|
import android.view.MotionEvent;
|
|
import androidx.cardview.widget.CardView;
|
|
import com.google.android.material.textfield.TextInputLayout;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: WidgetSettingsUserProfile.kt */
|
|
public final class WidgetSettingsUserProfile$onViewBound$2 extends o implements Function1<MotionEvent, Boolean> {
|
|
public final /* synthetic */ WidgetSettingsUserProfile this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetSettingsUserProfile$onViewBound$2(WidgetSettingsUserProfile widgetSettingsUserProfile) {
|
|
super(1);
|
|
this.this$0 = widgetSettingsUserProfile;
|
|
}
|
|
|
|
/* Return type fixed from 'java.lang.Object' to match base method */
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
|
|
@Override // kotlin.jvm.functions.Function1
|
|
public /* bridge */ /* synthetic */ Boolean invoke(MotionEvent motionEvent) {
|
|
return Boolean.valueOf(invoke(motionEvent));
|
|
}
|
|
|
|
public final boolean invoke(MotionEvent motionEvent) {
|
|
if (motionEvent == null) {
|
|
return false;
|
|
}
|
|
int actionMasked = motionEvent.getActionMasked();
|
|
boolean z2 = true;
|
|
if (actionMasked == 1 || actionMasked == 3) {
|
|
float rawX = motionEvent.getRawX();
|
|
float rawY = motionEvent.getRawY();
|
|
TextInputLayout textInputLayout = WidgetSettingsUserProfile.access$getBinding$p(this.this$0).d;
|
|
m.checkNotNullExpressionValue(textInputLayout, "binding.bioEditorTextInputFieldWrap");
|
|
int width = textInputLayout.getWidth();
|
|
TextInputLayout textInputLayout2 = WidgetSettingsUserProfile.access$getBinding$p(this.this$0).d;
|
|
m.checkNotNullExpressionValue(textInputLayout2, "binding.bioEditorTextInputFieldWrap");
|
|
int height = textInputLayout2.getHeight();
|
|
int[] iArr = new int[2];
|
|
WidgetSettingsUserProfile.access$getBinding$p(this.this$0).d.getLocationOnScreen(iArr);
|
|
int i = iArr[0];
|
|
int i2 = iArr[1];
|
|
if (rawX < ((float) i) || rawX > ((float) (i + width)) || rawY < ((float) i2) || rawY > ((float) (i2 + height))) {
|
|
CardView cardView = WidgetSettingsUserProfile.access$getBinding$p(this.this$0).b;
|
|
m.checkNotNullExpressionValue(cardView, "binding.bioEditorCard");
|
|
if (cardView.getVisibility() != 0) {
|
|
z2 = false;
|
|
}
|
|
if (z2) {
|
|
WidgetSettingsUserProfile.access$setCurrentBioFromEditor(this.this$0);
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|