discord-jadx/app/src/main/java/com/discord/widgets/chat/input/applicationcommands/SelectedAppCommandTitleAdap...

54 lines
2.9 KiB
Java
Raw Normal View History

2021-06-27 20:44:35 +00:00
package com.discord.widgets.chat.input.applicationcommands;
import android.view.View;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import c.d.b.a.a;
import com.discord.databinding.ViewAppcommandsOptiontitleListitemBinding;
import com.discord.models.commands.Application;
import com.discord.utilities.icon.IconUtils;
import com.discord.utilities.mg_recycler.MGRecyclerViewHolder;
import com.facebook.drawee.view.SimpleDraweeView;
import d0.z.d.m;
/* compiled from: SelectedApplicationCommandAdapter.kt */
public final class SelectedAppCommandTitleAdapterItem extends MGRecyclerViewHolder<SelectedApplicationCommandAdapter, SelectedApplicationCommandItem> {
private final ViewAppcommandsOptiontitleListitemBinding binding;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public SelectedAppCommandTitleAdapterItem(SelectedApplicationCommandAdapter selectedApplicationCommandAdapter) {
2021-07-19 19:45:22 +00:00
super(2131558728, selectedApplicationCommandAdapter);
2021-06-27 20:44:35 +00:00
m.checkNotNullParameter(selectedApplicationCommandAdapter, "adapter");
View view = this.itemView;
2021-07-19 19:45:22 +00:00
int i = 2131361976;
TextView textView = (TextView) view.findViewById(2131361976);
2021-06-27 20:44:35 +00:00
if (textView != null) {
2021-07-19 19:45:22 +00:00
i = 2131361977;
SimpleDraweeView simpleDraweeView = (SimpleDraweeView) view.findViewById(2131361977);
2021-06-27 20:44:35 +00:00
if (simpleDraweeView != null) {
ViewAppcommandsOptiontitleListitemBinding viewAppcommandsOptiontitleListitemBinding = new ViewAppcommandsOptiontitleListitemBinding((ConstraintLayout) view, textView, simpleDraweeView);
m.checkNotNullExpressionValue(viewAppcommandsOptiontitleListitemBinding, "ViewAppcommandsOptiontit…temBinding.bind(itemView)");
this.binding = viewAppcommandsOptiontitleListitemBinding;
return;
}
}
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i)));
}
public void onConfigure(int i, SelectedApplicationCommandItem selectedApplicationCommandItem) {
m.checkNotNullParameter(selectedApplicationCommandItem, "data");
super.onConfigure(i, (int) selectedApplicationCommandItem);
2021-07-19 19:45:22 +00:00
StringBuilder H = a.H('/');
H.append(selectedApplicationCommandItem.getTitle());
String sb = H.toString();
2021-06-27 20:44:35 +00:00
TextView textView = this.binding.b;
m.checkNotNullExpressionValue(textView, "binding.appcommandsOptiontitle");
textView.setText(sb);
Application application = selectedApplicationCommandItem.getApplication();
if (application != null) {
2021-07-19 19:45:22 +00:00
SimpleDraweeView simpleDraweeView = this.binding.f1645c;
2021-06-27 20:44:35 +00:00
m.checkNotNullExpressionValue(simpleDraweeView, "binding.appcommandsOptiontitleAvatar");
IconUtils.setApplicationIcon$default(simpleDraweeView, application, false, 4, null);
}
}
}