discord-jadx/app/src/main/java/com/discord/widgets/chat/list/adapter/WidgetChatListAdapterItemEp...

84 lines
4.9 KiB
Java
Raw Normal View History

2021-06-27 20:44:35 +00:00
package com.discord.widgets.chat.list.adapter;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.Guideline;
import c.a.l.b;
import com.discord.databinding.WidgetChatListAdapterItemEphemeralMessageBinding;
import com.discord.models.domain.ModelMessage;
import com.discord.widgets.chat.list.entries.ChatListEntry;
import com.discord.widgets.chat.list.entries.EphemeralMessageEntry;
import d0.z.d.m;
/* compiled from: WidgetChatListAdapterItemEphemeralMessage.kt */
public final class WidgetChatListAdapterItemEphemeralMessage extends WidgetChatListItem {
private final WidgetChatListAdapterItemEphemeralMessageBinding binding;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChatListAdapterItemEphemeralMessage(WidgetChatListAdapter widgetChatListAdapter) {
super(2131558931, widgetChatListAdapter);
m.checkNotNullParameter(widgetChatListAdapter, "adapter");
View view = this.itemView;
int i = 2131362517;
View findViewById = view.findViewById(2131362517);
if (findViewById != null) {
i = 2131362519;
View findViewById2 = view.findViewById(2131362519);
if (findViewById2 != null) {
i = 2131362520;
ImageView imageView = (ImageView) view.findViewById(2131362520);
if (imageView != null) {
i = 2131362537;
TextView textView = (TextView) view.findViewById(2131362537);
if (textView != null) {
i = 2131362547;
ImageView imageView2 = (ImageView) view.findViewById(2131362547);
if (imageView2 != null) {
i = 2131365323;
Guideline guideline = (Guideline) view.findViewById(2131365323);
if (guideline != null) {
WidgetChatListAdapterItemEphemeralMessageBinding widgetChatListAdapterItemEphemeralMessageBinding = new WidgetChatListAdapterItemEphemeralMessageBinding((ConstraintLayout) view, findViewById, findViewById2, imageView, textView, imageView2, guideline);
m.checkNotNullExpressionValue(widgetChatListAdapterItemEphemeralMessageBinding, "WidgetChatListAdapterIte…ageBinding.bind(itemView)");
this.binding = widgetChatListAdapterItemEphemeralMessageBinding;
return;
}
}
}
}
}
}
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(i)));
}
public static final /* synthetic */ WidgetChatListAdapter access$getAdapter$p(WidgetChatListAdapterItemEphemeralMessage widgetChatListAdapterItemEphemeralMessage) {
return (WidgetChatListAdapter) widgetChatListAdapterItemEphemeralMessage.adapter;
}
public static final /* synthetic */ WidgetChatListAdapterItemEphemeralMessageBinding access$getBinding$p(WidgetChatListAdapterItemEphemeralMessage widgetChatListAdapterItemEphemeralMessage) {
return widgetChatListAdapterItemEphemeralMessage.binding;
}
@Override // com.discord.widgets.chat.list.adapter.WidgetChatListItem
public void onConfigure(int i, ChatListEntry chatListEntry) {
m.checkNotNullParameter(chatListEntry, "data");
super.onConfigure(i, chatListEntry);
ModelMessage message = ((EphemeralMessageEntry) chatListEntry).getMessage();
View view = this.binding.b;
m.checkNotNullExpressionValue(view, "binding.chatListAdapterItemGutterBg");
View view2 = this.binding.f1728c;
m.checkNotNullExpressionValue(view2, "binding.chatListAdapterItemHighlightedBg");
configureCellHighlight(message, view2, view);
this.binding.d.setOnClickListener(new WidgetChatListAdapterItemEphemeralMessage$onConfigure$1(this));
TextView textView = this.binding.e;
m.checkNotNullExpressionValue(textView, "binding.chatListAdapterItemTextDismiss");
String quantityString = textView.getResources().getQuantityString(2131755231, 1);
m.checkNotNullExpressionValue(quantityString, "itemDismiss.resources.ge…nd_delete_these_count, 1)");
String quantityString2 = textView.getResources().getQuantityString(2131755232, 1);
m.checkNotNullExpressionValue(quantityString2, "itemDismiss.resources.ge…e_these_countMessages, 1)");
textView.setMovementMethod(LinkMovementMethod.getInstance());
textView.setText(b.c(textView, 2131891642, new Object[]{quantityString, quantityString2}, new WidgetChatListAdapterItemEphemeralMessage$onConfigure$2(this, message)));
}
}