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

81 lines
4.1 KiB
Java

package com.discord.widgets.chat.list.adapter;
import android.content.Context;
import android.graphics.Typeface;
import android.text.style.ForegroundColorSpan;
import com.discord.i18n.Hook;
import com.discord.i18n.RenderContext;
import com.discord.models.member.GuildMember;
import com.discord.utilities.font.FontUtils;
import com.discord.utilities.spans.TypefaceSpanCompat;
import d0.z.d.m;
import d0.z.d.o;
import java.util.List;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetChatListAdapterItemStart.kt */
public final class WidgetChatListAdapterItemStart$configureThread$1 extends o implements Function1<RenderContext, Unit> {
public final /* synthetic */ Context $context;
public final /* synthetic */ GuildMember $threadCreatorMember;
public final /* synthetic */ String $threadCreatorName;
public final /* synthetic */ WidgetChatListAdapterItemStart this$0;
/* compiled from: WidgetChatListAdapterItemStart.kt */
/* renamed from: com.discord.widgets.chat.list.adapter.WidgetChatListAdapterItemStart$configureThread$1$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function1<Hook, Unit> {
public final /* synthetic */ WidgetChatListAdapterItemStart$configureThread$1 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(WidgetChatListAdapterItemStart$configureThread$1 widgetChatListAdapterItemStart$configureThread$1) {
super(1);
this.this$0 = widgetChatListAdapterItemStart$configureThread$1;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Hook hook) {
invoke(hook);
return Unit.a;
}
public final void invoke(Hook hook) {
m.checkNotNullParameter(hook, "$receiver");
WidgetChatListAdapterItemStart$configureThread$1 widgetChatListAdapterItemStart$configureThread$1 = this.this$0;
hook.b = widgetChatListAdapterItemStart$configureThread$1.$threadCreatorName;
FontUtils fontUtils = FontUtils.INSTANCE;
Context context = widgetChatListAdapterItemStart$configureThread$1.$context;
m.checkNotNullExpressionValue(context, "context");
Typeface themedFont = fontUtils.getThemedFont(context, 2130969326);
if (themedFont != null) {
hook.a.add(new TypefaceSpanCompat(themedFont));
}
List<Object> list = hook.a;
WidgetChatListAdapterItemStart$configureThread$1 widgetChatListAdapterItemStart$configureThread$12 = this.this$0;
list.add(new ForegroundColorSpan(WidgetChatListAdapterItemStart.access$getAuthorTextColor(widgetChatListAdapterItemStart$configureThread$12.this$0, widgetChatListAdapterItemStart$configureThread$12.$threadCreatorMember)));
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetChatListAdapterItemStart$configureThread$1(WidgetChatListAdapterItemStart widgetChatListAdapterItemStart, String str, Context context, GuildMember guildMember) {
super(1);
this.this$0 = widgetChatListAdapterItemStart;
this.$threadCreatorName = str;
this.$context = context;
this.$threadCreatorMember = guildMember;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(RenderContext renderContext) {
invoke(renderContext);
return Unit.a;
}
public final void invoke(RenderContext renderContext) {
m.checkNotNullParameter(renderContext, "$receiver");
renderContext.a("usernameHook", new AnonymousClass1(this));
}
}