2021-09-27 20:31:35 +00:00
|
|
|
package com.discord.widgets.guildscheduledevent;
|
|
|
|
|
|
|
|
import android.graphics.drawable.Drawable;
|
|
|
|
import android.text.SpannableString;
|
|
|
|
import android.text.style.ImageSpan;
|
|
|
|
import androidx.core.content.ContextCompat;
|
|
|
|
import c.d.b.a.a;
|
2021-10-15 06:18:26 +00:00
|
|
|
import c0.z.d.m;
|
|
|
|
import c0.z.d.o;
|
2021-09-27 20:31:35 +00:00
|
|
|
import com.discord.i18n.Hook;
|
|
|
|
import com.discord.i18n.RenderContext;
|
|
|
|
import com.discord.utilities.dimen.DimenUtils;
|
|
|
|
import com.discord.widgets.guildscheduledevent.PreviewGuildScheduledEventViewModel;
|
|
|
|
import kotlin.Unit;
|
|
|
|
import kotlin.jvm.functions.Function1;
|
|
|
|
/* compiled from: WidgetPreviewGuildScheduledEvent.kt */
|
|
|
|
public final class WidgetPreviewGuildScheduledEvent$configureTextForCreation$2 extends o implements Function1<RenderContext, Unit> {
|
|
|
|
public final /* synthetic */ String $channelName;
|
|
|
|
public final /* synthetic */ PreviewGuildScheduledEventViewModel.ViewState.Initialized $viewState;
|
|
|
|
public final /* synthetic */ WidgetPreviewGuildScheduledEvent this$0;
|
|
|
|
|
|
|
|
/* compiled from: WidgetPreviewGuildScheduledEvent.kt */
|
|
|
|
/* renamed from: com.discord.widgets.guildscheduledevent.WidgetPreviewGuildScheduledEvent$configureTextForCreation$2$1 reason: invalid class name */
|
|
|
|
public static final class AnonymousClass1 extends o implements Function1<Hook, Unit> {
|
|
|
|
public final /* synthetic */ WidgetPreviewGuildScheduledEvent$configureTextForCreation$2 this$0;
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public AnonymousClass1(WidgetPreviewGuildScheduledEvent$configureTextForCreation$2 widgetPreviewGuildScheduledEvent$configureTextForCreation$2) {
|
|
|
|
super(1);
|
|
|
|
this.this$0 = widgetPreviewGuildScheduledEvent$configureTextForCreation$2;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 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");
|
2021-10-09 06:29:02 +00:00
|
|
|
StringBuilder O = a.O(". ");
|
|
|
|
O.append(this.this$0.$channelName);
|
|
|
|
SpannableString spannableString = new SpannableString(O.toString());
|
2021-09-27 20:31:35 +00:00
|
|
|
int dpToPixels = DimenUtils.dpToPixels(20);
|
|
|
|
Drawable drawable = ContextCompat.getDrawable(this.this$0.this$0.requireContext(), this.this$0.$viewState.getLocationInfo().getLocationIcon());
|
|
|
|
m.checkNotNull(drawable);
|
|
|
|
drawable.setBounds(0, 0, dpToPixels, dpToPixels);
|
|
|
|
m.checkNotNullExpressionValue(drawable, "ContextCompat.getDrawabl…ze)\n }");
|
|
|
|
spannableString.setSpan(new ImageSpan(drawable), 0, 1, 17);
|
|
|
|
hook.b = spannableString;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
|
|
public WidgetPreviewGuildScheduledEvent$configureTextForCreation$2(WidgetPreviewGuildScheduledEvent widgetPreviewGuildScheduledEvent, String str, PreviewGuildScheduledEventViewModel.ViewState.Initialized initialized) {
|
|
|
|
super(1);
|
|
|
|
this.this$0 = widgetPreviewGuildScheduledEvent;
|
|
|
|
this.$channelName = str;
|
|
|
|
this.$viewState = initialized;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 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.put("channelName", this.$channelName);
|
|
|
|
renderContext.a("channelHook", new AnonymousClass1(this));
|
|
|
|
}
|
|
|
|
}
|