forked from Juby210/discord-jadx
34 lines
1.8 KiB
Java
34 lines
1.8 KiB
Java
package com.discord.widgets.botuikit.views;
|
|
|
|
import android.content.Context;
|
|
import android.view.View;
|
|
import c0.z.d.m;
|
|
import com.discord.databinding.WidgetChatListBotUiButtonComponentBinding;
|
|
import com.discord.models.botuikit.ButtonMessageComponent;
|
|
import com.discord.utilities.uri.UriHandler;
|
|
import com.google.android.material.button.MaterialButton;
|
|
/* compiled from: ButtonComponentView.kt */
|
|
public final class ButtonComponentView$configure$1 implements View.OnClickListener {
|
|
public final /* synthetic */ WidgetChatListBotUiButtonComponentBinding $binding;
|
|
public final /* synthetic */ ButtonMessageComponent $component;
|
|
public final /* synthetic */ ComponentActionListener $componentActionListener;
|
|
|
|
public ButtonComponentView$configure$1(ButtonMessageComponent buttonMessageComponent, WidgetChatListBotUiButtonComponentBinding widgetChatListBotUiButtonComponentBinding, ComponentActionListener componentActionListener) {
|
|
this.$component = buttonMessageComponent;
|
|
this.$binding = widgetChatListBotUiButtonComponentBinding;
|
|
this.$componentActionListener = componentActionListener;
|
|
}
|
|
|
|
@Override // android.view.View.OnClickListener
|
|
public final void onClick(View view) {
|
|
if (this.$component.getUrl() != null) {
|
|
MaterialButton materialButton = this.$binding.b;
|
|
m.checkNotNullExpressionValue(materialButton, "binding.button");
|
|
Context context = materialButton.getContext();
|
|
m.checkNotNullExpressionValue(context, "binding.button.context");
|
|
UriHandler.handleOrUntrusted$default(context, this.$component.getUrl(), null, 4, null);
|
|
} else if (this.$component.getCustomId() != null) {
|
|
this.$componentActionListener.onButtonComponentClick(this.$component.getIndex(), this.$component.getCustomId());
|
|
}
|
|
}
|
|
}
|