45 lines
2.2 KiB
Java
45 lines
2.2 KiB
Java
package com.discord.widgets.phone;
|
|
|
|
import android.content.Context;
|
|
import android.view.View;
|
|
import android.widget.TextView;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import com.discord.databinding.WidgetPhoneCountryCodeListItemBinding;
|
|
import com.discord.models.phone.PhoneCountryCode;
|
|
import com.discord.utilities.phone.PhoneUtils;
|
|
import d0.z.d.m;
|
|
/* compiled from: PhoneCountryCodeAdapterItem.kt */
|
|
public final class PhoneCountryCodeAdapterItem extends RecyclerView.ViewHolder {
|
|
private final PhoneCountryCodeAdapter adapter;
|
|
private final WidgetPhoneCountryCodeListItemBinding binding;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public PhoneCountryCodeAdapterItem(PhoneCountryCodeAdapter phoneCountryCodeAdapter, WidgetPhoneCountryCodeListItemBinding widgetPhoneCountryCodeListItemBinding) {
|
|
super(widgetPhoneCountryCodeListItemBinding.a);
|
|
m.checkNotNullParameter(phoneCountryCodeAdapter, "adapter");
|
|
m.checkNotNullParameter(widgetPhoneCountryCodeListItemBinding, "binding");
|
|
this.adapter = phoneCountryCodeAdapter;
|
|
this.binding = widgetPhoneCountryCodeListItemBinding;
|
|
}
|
|
|
|
public static final /* synthetic */ PhoneCountryCodeAdapter access$getAdapter$p(PhoneCountryCodeAdapterItem phoneCountryCodeAdapterItem) {
|
|
return phoneCountryCodeAdapterItem.adapter;
|
|
}
|
|
|
|
public final void bind(PhoneCountryCode phoneCountryCode) {
|
|
m.checkNotNullParameter(phoneCountryCode, "data");
|
|
TextView textView = this.binding.d;
|
|
m.checkNotNullExpressionValue(textView, "binding.phoneCountryCodeName");
|
|
PhoneUtils phoneUtils = PhoneUtils.INSTANCE;
|
|
View view = this.itemView;
|
|
m.checkNotNullExpressionValue(view, "itemView");
|
|
Context context = view.getContext();
|
|
m.checkNotNullExpressionValue(context, "itemView.context");
|
|
textView.setText(phoneUtils.getTranslatedStringForCountry(phoneCountryCode, context));
|
|
TextView textView2 = this.binding.b;
|
|
m.checkNotNullExpressionValue(textView2, "binding.phoneCountryCodeCode");
|
|
textView2.setText(phoneCountryCode.getCode());
|
|
this.binding.f1864c.setOnClickListener(new PhoneCountryCodeAdapterItem$bind$1(this, phoneCountryCode));
|
|
}
|
|
}
|