116 lines
4.0 KiB
Java
116 lines
4.0 KiB
Java
package c.a.y;
|
|
|
|
import android.animation.Animator;
|
|
import android.content.Context;
|
|
import android.util.Log;
|
|
import android.view.View;
|
|
import androidx.core.view.ViewCompat;
|
|
import com.discord.app.AppComponent;
|
|
import com.discord.overlay.views.OverlayDialog;
|
|
import d0.z.d.m;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function1;
|
|
import rx.subjects.PublishSubject;
|
|
import rx.subjects.Subject;
|
|
/* compiled from: OverlayAppDialog.kt */
|
|
public abstract class k extends OverlayDialog implements AppComponent {
|
|
public final Subject<Void, Void> w;
|
|
|
|
/* renamed from: x reason: collision with root package name */
|
|
public Function1<? super OverlayDialog, Unit> f239x = l.i;
|
|
|
|
/* compiled from: Animator.kt */
|
|
public static final class a implements Animator.AnimatorListener {
|
|
public final /* synthetic */ k a;
|
|
|
|
public a(k kVar) {
|
|
this.a = kVar;
|
|
}
|
|
|
|
@Override // android.animation.Animator.AnimatorListener
|
|
public void onAnimationCancel(Animator animator) {
|
|
m.checkParameterIsNotNull(animator, "animator");
|
|
}
|
|
|
|
@Override // android.animation.Animator.AnimatorListener
|
|
public void onAnimationEnd(Animator animator) {
|
|
m.checkParameterIsNotNull(animator, "animator");
|
|
this.a.getOnDialogClosed().invoke(this.a);
|
|
}
|
|
|
|
@Override // android.animation.Animator.AnimatorListener
|
|
public void onAnimationRepeat(Animator animator) {
|
|
m.checkParameterIsNotNull(animator, "animator");
|
|
}
|
|
|
|
@Override // android.animation.Animator.AnimatorListener
|
|
public void onAnimationStart(Animator animator) {
|
|
m.checkParameterIsNotNull(animator, "animator");
|
|
}
|
|
}
|
|
|
|
/* compiled from: OverlayAppDialog.kt */
|
|
public static final class b implements View.OnAttachStateChangeListener {
|
|
public final /* synthetic */ Animator i;
|
|
|
|
public b(Animator animator) {
|
|
this.i = animator;
|
|
}
|
|
|
|
@Override // android.view.View.OnAttachStateChangeListener
|
|
public void onViewAttachedToWindow(View view) {
|
|
}
|
|
|
|
@Override // android.view.View.OnAttachStateChangeListener
|
|
public void onViewDetachedFromWindow(View view) {
|
|
this.i.end();
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public k(Context context) {
|
|
super(context);
|
|
m.checkNotNullParameter(context, "context");
|
|
PublishSubject k0 = PublishSubject.k0();
|
|
m.checkNotNullExpressionValue(k0, "PublishSubject.create()");
|
|
this.w = k0;
|
|
setOnClickListener(new j(this));
|
|
}
|
|
|
|
public final void g() {
|
|
getUnsubscribeSignal().onNext(null);
|
|
Log.i(getClass().getSimpleName(), "closing");
|
|
if (!ViewCompat.isAttachedToWindow(this)) {
|
|
this.f239x.invoke(this);
|
|
return;
|
|
}
|
|
Animator closingAnimator = getClosingAnimator();
|
|
closingAnimator.addListener(new a(this));
|
|
closingAnimator.start();
|
|
addOnAttachStateChangeListener(new b(closingAnimator));
|
|
}
|
|
|
|
public abstract Animator getClosingAnimator();
|
|
|
|
/* JADX DEBUG: Type inference failed for r0v0. Raw type applied. Possible types: kotlin.jvm.functions.Function1<? super com.discord.overlay.views.OverlayDialog, kotlin.Unit>, kotlin.jvm.functions.Function1<com.discord.overlay.views.OverlayDialog, kotlin.Unit> */
|
|
public final Function1<OverlayDialog, Unit> getOnDialogClosed() {
|
|
return this.f239x;
|
|
}
|
|
|
|
@Override // com.discord.app.AppComponent
|
|
public Subject<Void, Void> getUnsubscribeSignal() {
|
|
return this.w;
|
|
}
|
|
|
|
@Override // android.view.View, android.view.ViewGroup
|
|
public void onDetachedFromWindow() {
|
|
getUnsubscribeSignal().onNext(null);
|
|
super.onDetachedFromWindow();
|
|
}
|
|
|
|
public final void setOnDialogClosed(Function1<? super OverlayDialog, Unit> function1) {
|
|
m.checkNotNullParameter(function1, "<set-?>");
|
|
this.f239x = function1;
|
|
}
|
|
}
|