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;
2021-07-19 19:45:22 +00:00
import c.a.k.b;
2021-06-27 20:44:35 +00:00
import com.discord.databinding.WidgetChatListAdapterItemEphemeralMessageBinding;
2021-07-03 23:36:06 +00:00
import com.discord.models.message.Message;
2021-06-27 20:44:35 +00:00
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) {
2021-07-19 19:45:22 +00:00
super(2131558943, widgetChatListAdapter);
2021-06-27 20:44:35 +00:00
m.checkNotNullParameter(widgetChatListAdapter, "adapter");
View view = this.itemView;
2021-07-19 19:45:22 +00:00
int i = 2131362538;
View findViewById = view.findViewById(2131362538);
2021-06-27 20:44:35 +00:00
if (findViewById != null) {
2021-07-19 19:45:22 +00:00
i = 2131362540;
View findViewById2 = view.findViewById(2131362540);
2021-06-27 20:44:35 +00:00
if (findViewById2 != null) {
2021-07-19 19:45:22 +00:00
i = 2131362541;
ImageView imageView = (ImageView) view.findViewById(2131362541);
2021-06-27 20:44:35 +00:00
if (imageView != null) {
2021-07-19 19:45:22 +00:00
i = 2131362558;
TextView textView = (TextView) view.findViewById(2131362558);
2021-06-27 20:44:35 +00:00
if (textView != null) {
2021-07-19 19:45:22 +00:00
i = 2131362568;
ImageView imageView2 = (ImageView) view.findViewById(2131362568);
2021-06-27 20:44:35 +00:00
if (imageView2 != null) {
2021-07-20 00:17:12 +00:00
i = 2131365471;
Guideline guideline = (Guideline) view.findViewById(2131365471);
2021-06-27 20:44:35 +00:00
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);
2021-06-27 20:53:42 +00:00
Message message = ((EphemeralMessageEntry) chatListEntry).getMessage();
2021-06-27 20:44:35 +00:00
View view = this.binding.b;
m.checkNotNullExpressionValue(view, "binding.chatListAdapterItemGutterBg");
2021-07-19 19:45:22 +00:00
View view2 = this.binding.f1738c;
2021-06-27 20:44:35 +00:00
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");
2021-07-19 19:45:22 +00:00
String quantityString = textView.getResources().getQuantityString(2131755235, 1);
2021-06-27 20:44:35 +00:00
m.checkNotNullExpressionValue(quantityString, "itemDismiss.resources.ge…nd_delete_these_count, 1)");
2021-07-19 19:45:22 +00:00
String quantityString2 = textView.getResources().getQuantityString(2131755236, 1);
2021-06-27 20:44:35 +00:00
m.checkNotNullExpressionValue(quantityString2, "itemDismiss.resources.ge…e_these_countMessages, 1)");
textView.setMovementMethod(LinkMovementMethod.getInstance());
2021-07-19 19:45:22 +00:00
textView.setText(b.c(textView, 2131891830, new Object[]{quantityString, quantityString2}, new WidgetChatListAdapterItemEphemeralMessage$onConfigure$2(this, message)));
2021-06-27 20:44:35 +00:00
}
}