discord-jadx/app/src/main/java/com/discord/widgets/guildscheduledevent/GuildScheduledEventListAdap...

69 lines
3.7 KiB
Java

package com.discord.widgets.guildscheduledevent;
import android.content.Context;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.ViewKt;
import com.discord.api.channel.Channel;
import com.discord.stores.StoreStream;
import com.discord.utilities.channel.ChannelInviteLaunchUtils;
import com.discord.utilities.guildscheduledevent.GuildScheduledEventUtilities;
import com.discord.utilities.rx.ObservableExtensionsKt;
import com.discord.widgets.guildscheduledevent.GuildScheduledEventListAdapter;
import com.discord.widgets.guildscheduledevent.GuildScheduledEventListItem;
import d0.z.d.m;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import rx.Observable;
/* compiled from: GuildScheduledEventListAdapter.kt */
public final class GuildScheduledEventListAdapter$EventViewHolder$onConfigure$3 extends o implements Function0<Unit> {
public final /* synthetic */ GuildScheduledEventListItem.Event $item;
public final /* synthetic */ GuildScheduledEventListAdapter.EventViewHolder this$0;
/* compiled from: GuildScheduledEventListAdapter.kt */
/* renamed from: com.discord.widgets.guildscheduledevent.GuildScheduledEventListAdapter$EventViewHolder$onConfigure$3$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function1<Channel, Unit> {
public final /* synthetic */ GuildScheduledEventListAdapter$EventViewHolder$onConfigure$3 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(GuildScheduledEventListAdapter$EventViewHolder$onConfigure$3 guildScheduledEventListAdapter$EventViewHolder$onConfigure$3) {
super(1);
this.this$0 = guildScheduledEventListAdapter$EventViewHolder$onConfigure$3;
}
/* 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(Channel channel) {
invoke(channel);
return Unit.a;
}
public final void invoke(Channel channel) {
ChannelInviteLaunchUtils channelInviteLaunchUtils = ChannelInviteLaunchUtils.INSTANCE;
Fragment findFragment = ViewKt.findFragment(GuildScheduledEventListAdapter.this.getRecycler());
Channel channel2 = this.this$0.$item.getChannel();
if (channel2 == null) {
channel2 = channel;
}
ChannelInviteLaunchUtils.inviteToChannel$default(channelInviteLaunchUtils, findFragment, channel2, GuildScheduledEventUtilities.ANALYTICS_SOURCE, Long.valueOf(this.this$0.$item.getEvent().g()), null, 16, null);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public GuildScheduledEventListAdapter$EventViewHolder$onConfigure$3(GuildScheduledEventListAdapter.EventViewHolder eventViewHolder, GuildScheduledEventListItem.Event event) {
super(0);
this.this$0 = eventViewHolder;
this.$item = event;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
Observable<Channel> y2 = StoreStream.Companion.getChannels().observeDefaultChannel(this.$item.getEvent().f()).y();
m.checkNotNullExpressionValue(y2, "StoreStream.getChannels(…\n .first()");
ObservableExtensionsKt.appSubscribe$default(y2, this.this$0.getClass(), (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new AnonymousClass1(this), 62, (Object) null);
}
}