package com.discord.stores; import com.discord.models.message.Message; import com.discord.stores.StoreMessagesLoader; import d0.z.d.m; import d0.z.d.o; import java.util.List; import kotlin.Unit; import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function4; /* compiled from: StoreMessagesLoader.kt */ public final class StoreMessagesLoader$tryLoadMessages$4 extends o implements Function4, Boolean, Boolean, Unit> { public final /* synthetic */ StoreMessagesLoader$tryLoadMessages$3 $loadMessages$3; public final /* synthetic */ StoreMessagesLoader this$0; /* compiled from: StoreMessagesLoader.kt */ /* renamed from: com.discord.stores.StoreMessagesLoader$tryLoadMessages$4$1 reason: invalid class name */ public static final class AnonymousClass1 extends o implements Function1 { public static final AnonymousClass1 INSTANCE = new AnonymousClass1(); public AnonymousClass1() { super(1); } public final StoreMessagesLoader.ChannelLoadedState invoke(StoreMessagesLoader.ChannelLoadedState channelLoadedState) { m.checkNotNullParameter(channelLoadedState, "it"); return StoreMessagesLoader.ChannelLoadedState.copy$default(channelLoadedState, false, false, false, false, null, 27, null); } } /* JADX INFO: super call moved to the top of the method (can break code semantics) */ public StoreMessagesLoader$tryLoadMessages$4(StoreMessagesLoader storeMessagesLoader, StoreMessagesLoader$tryLoadMessages$3 storeMessagesLoader$tryLoadMessages$3) { super(4); this.this$0 = storeMessagesLoader; this.$loadMessages$3 = storeMessagesLoader$tryLoadMessages$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, java.lang.Object, java.lang.Object, java.lang.Object] */ @Override // kotlin.jvm.functions.Function4 public /* bridge */ /* synthetic */ Unit invoke(Long l, List list, Boolean bool, Boolean bool2) { invoke(l.longValue(), (List) list, bool.booleanValue(), bool2.booleanValue()); return Unit.a; } public final synchronized void invoke(long j, List list, boolean z2, boolean z3) { m.checkNotNullParameter(list, "messages"); if (list.isEmpty()) { StoreMessagesLoader.access$channelLoadedStateUpdate(this.this$0, j, AnonymousClass1.INSTANCE); return; } if (z2) { StoreMessagesLoader$tryLoadMessages$3.invoke$default(this.$loadMessages$3, j, null, Long.valueOf(list.get(0).getId()), null, 10, null); } else if (z3) { StoreMessagesLoader$tryLoadMessages$3.invoke$default(this.$loadMessages$3, j, null, null, Long.valueOf(list.get(list.size() - 1).getId()), 6, null); } } }