82 lines
4.0 KiB
Java
82 lines
4.0 KiB
Java
package com.discord.widgets.chat.input;
|
|
|
|
import android.content.Context;
|
|
import android.view.View;
|
|
import android.widget.LinearLayout;
|
|
import androidx.appcompat.widget.AppCompatImageButton;
|
|
import com.discord.floating_view_manager.FloatingViewGravity;
|
|
import com.discord.tooltips.SparkleView;
|
|
import com.discord.tooltips.TooltipManager;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import j0.k.b;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function0;
|
|
import rx.Observable;
|
|
/* compiled from: WidgetChatInput.kt */
|
|
public final class WidgetChatInput$showExpressionButtonSparkle$1 extends o implements Function0<Unit> {
|
|
public final /* synthetic */ TooltipManager.Tooltip $tooltip;
|
|
public final /* synthetic */ WidgetChatInput this$0;
|
|
|
|
/* compiled from: WidgetChatInput.kt */
|
|
/* renamed from: com.discord.widgets.chat.input.WidgetChatInput$showExpressionButtonSparkle$1$1 reason: invalid class name */
|
|
public static final class AnonymousClass1<T, R> implements b<Void, Unit> {
|
|
public static final AnonymousClass1 INSTANCE = new AnonymousClass1();
|
|
|
|
/* 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 // j0.k.b
|
|
public /* bridge */ /* synthetic */ Unit call(Void r1) {
|
|
call(r1);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void call(Void r1) {
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetChatInput.kt */
|
|
/* renamed from: com.discord.widgets.chat.input.WidgetChatInput$showExpressionButtonSparkle$1$2 reason: invalid class name */
|
|
public static final class AnonymousClass2 implements View.OnClickListener {
|
|
public final /* synthetic */ View $expressionButton;
|
|
public final /* synthetic */ WidgetChatInput$showExpressionButtonSparkle$1 this$0;
|
|
|
|
public AnonymousClass2(WidgetChatInput$showExpressionButtonSparkle$1 widgetChatInput$showExpressionButtonSparkle$1, View view) {
|
|
this.this$0 = widgetChatInput$showExpressionButtonSparkle$1;
|
|
this.$expressionButton = view;
|
|
}
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
WidgetChatInput.access$getTooltipManager$p(this.this$0.this$0).a(this.this$0.$tooltip);
|
|
this.$expressionButton.performClick();
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetChatInput$showExpressionButtonSparkle$1(WidgetChatInput widgetChatInput, TooltipManager.Tooltip tooltip) {
|
|
super(0);
|
|
this.this$0 = widgetChatInput;
|
|
this.$tooltip = tooltip;
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final void mo1invoke() {
|
|
AppCompatImageButton appCompatImageButton = WidgetChatInput.access$getFlexInputFragment$p(this.this$0).j().i;
|
|
m.checkNotNullExpressionValue(appCompatImageButton, "binding.expressionBtn");
|
|
LinearLayout linearLayout = WidgetChatInput.access$getBinding$p(this.this$0).d;
|
|
m.checkNotNullExpressionValue(linearLayout, "binding.chatInputContainer");
|
|
Context context = linearLayout.getContext();
|
|
m.checkNotNullExpressionValue(context, "binding.chatInputContainer.context");
|
|
SparkleView sparkleView = new SparkleView(context, null);
|
|
TooltipManager access$getTooltipManager$p = WidgetChatInput.access$getTooltipManager$p(this.this$0);
|
|
TooltipManager.Tooltip tooltip = this.$tooltip;
|
|
FloatingViewGravity floatingViewGravity = FloatingViewGravity.CENTER;
|
|
Observable<Void> F = this.this$0.getUnsubscribeSignal().F(AnonymousClass1.INSTANCE);
|
|
m.checkNotNullExpressionValue(F, "unsubscribeSignal.map { }");
|
|
TooltipManager.e(access$getTooltipManager$p, appCompatImageButton, sparkleView, tooltip, floatingViewGravity, 0, 0, false, F, 112, null);
|
|
sparkleView.setOnClickListener(new AnonymousClass2(this, appCompatImageButton));
|
|
}
|
|
}
|