84 lines
4.9 KiB
Java
84 lines
4.9 KiB
Java
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.k.b;
|
|
import com.discord.databinding.WidgetChatListAdapterItemEphemeralMessageBinding;
|
|
import com.discord.models.message.Message;
|
|
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(2131558943, widgetChatListAdapter);
|
|
m.checkNotNullParameter(widgetChatListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
int i = 2131362538;
|
|
View findViewById = view.findViewById(2131362538);
|
|
if (findViewById != null) {
|
|
i = 2131362540;
|
|
View findViewById2 = view.findViewById(2131362540);
|
|
if (findViewById2 != null) {
|
|
i = 2131362541;
|
|
ImageView imageView = (ImageView) view.findViewById(2131362541);
|
|
if (imageView != null) {
|
|
i = 2131362558;
|
|
TextView textView = (TextView) view.findViewById(2131362558);
|
|
if (textView != null) {
|
|
i = 2131362568;
|
|
ImageView imageView2 = (ImageView) view.findViewById(2131362568);
|
|
if (imageView2 != null) {
|
|
i = 2131365471;
|
|
Guideline guideline = (Guideline) view.findViewById(2131365471);
|
|
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);
|
|
Message message = ((EphemeralMessageEntry) chatListEntry).getMessage();
|
|
View view = this.binding.b;
|
|
m.checkNotNullExpressionValue(view, "binding.chatListAdapterItemGutterBg");
|
|
View view2 = this.binding.f1738c;
|
|
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(2131755235, 1);
|
|
m.checkNotNullExpressionValue(quantityString, "itemDismiss.resources.ge…nd_delete_these_count, 1)");
|
|
String quantityString2 = textView.getResources().getQuantityString(2131755236, 1);
|
|
m.checkNotNullExpressionValue(quantityString2, "itemDismiss.resources.ge…e_these_countMessages, 1)");
|
|
textView.setMovementMethod(LinkMovementMethod.getInstance());
|
|
textView.setText(b.c(textView, 2131891830, new Object[]{quantityString, quantityString2}, new WidgetChatListAdapterItemEphemeralMessage$onConfigure$2(this, message)));
|
|
}
|
|
}
|