60 lines
3.2 KiB
Java
60 lines
3.2 KiB
Java
package com.discord.widgets.chat.list.adapter;
|
|
|
|
import android.content.Context;
|
|
import android.content.res.Resources;
|
|
import android.view.View;
|
|
import android.widget.RelativeLayout;
|
|
import android.widget.TextView;
|
|
import c.a.k.b;
|
|
import c.d.b.a.a;
|
|
import com.discord.databinding.WidgetChatListAdapterItemBlockedBinding;
|
|
import com.discord.models.message.Message;
|
|
import com.discord.utilities.resources.StringResourceUtilsKt;
|
|
import com.discord.widgets.chat.list.entries.BlockedMessagesEntry;
|
|
import com.discord.widgets.chat.list.entries.ChatListEntry;
|
|
import d0.z.d.m;
|
|
/* compiled from: WidgetChatListAdapterItemBlocked.kt */
|
|
public final class WidgetChatListAdapterItemBlocked extends WidgetChatListItem {
|
|
private final WidgetChatListAdapterItemBlockedBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetChatListAdapterItemBlocked(WidgetChatListAdapter widgetChatListAdapter) {
|
|
super(2131558936, widgetChatListAdapter);
|
|
m.checkNotNullParameter(widgetChatListAdapter, "adapter");
|
|
View view = this.itemView;
|
|
TextView textView = (TextView) view.findViewById(2131362527);
|
|
if (textView != null) {
|
|
WidgetChatListAdapterItemBlockedBinding widgetChatListAdapterItemBlockedBinding = new WidgetChatListAdapterItemBlockedBinding((RelativeLayout) view, textView);
|
|
m.checkNotNullExpressionValue(widgetChatListAdapterItemBlockedBinding, "WidgetChatListAdapterIte…kedBinding.bind(itemView)");
|
|
this.binding = widgetChatListAdapterItemBlockedBinding;
|
|
return;
|
|
}
|
|
throw new NullPointerException("Missing required view with ID: ".concat(view.getResources().getResourceName(2131362527)));
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetChatListAdapter access$getAdapter$p(WidgetChatListAdapterItemBlocked widgetChatListAdapterItemBlocked) {
|
|
return (WidgetChatListAdapter) widgetChatListAdapterItemBlocked.adapter;
|
|
}
|
|
|
|
private final CharSequence getBlockedText(Resources resources, Context context, int i) {
|
|
return b.h(resources, 2131887036, new Object[]{StringResourceUtilsKt.getI18nPluralString(context, 2131755042, i, Integer.valueOf(i))}, null, 4);
|
|
}
|
|
|
|
@Override // com.discord.widgets.chat.list.adapter.WidgetChatListItem
|
|
public void onConfigure(int i, ChatListEntry chatListEntry) {
|
|
m.checkNotNullParameter(chatListEntry, "data");
|
|
super.onConfigure(i, chatListEntry);
|
|
BlockedMessagesEntry blockedMessagesEntry = (BlockedMessagesEntry) chatListEntry;
|
|
Message component1 = blockedMessagesEntry.component1();
|
|
int component2 = blockedMessagesEntry.component2();
|
|
TextView textView = this.binding.b;
|
|
m.checkNotNullExpressionValue(textView, "binding.chatListAdapterItemBlocked");
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
Resources resources = view.getResources();
|
|
m.checkNotNullExpressionValue(resources, "itemView.resources");
|
|
textView.setText(getBlockedText(resources, a.x(this.itemView, "itemView", "itemView.context"), component2));
|
|
this.binding.a.setOnClickListener(new WidgetChatListAdapterItemBlocked$onConfigure$1(this, component1));
|
|
}
|
|
}
|