discord-jadx/app/src/main/java/com/discord/stores/StoreApplicationCommands$ob...

37 lines
1.6 KiB
Java

package com.discord.stores;
import com.discord.models.commands.Application;
import d0.z.d.o;
import java.util.ArrayList;
import java.util.List;
import kotlin.jvm.functions.Function0;
/* compiled from: StoreApplicationCommands.kt */
public final class StoreApplicationCommands$observeGuildApplications$1 extends o implements Function0<List<? extends Application>> {
public final /* synthetic */ long $channelId;
public final /* synthetic */ StoreApplicationCommands this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreApplicationCommands$observeGuildApplications$1(StoreApplicationCommands storeApplicationCommands, long j) {
super(0);
this.this$0 = storeApplicationCommands;
this.$channelId = j;
}
/* Return type fixed from 'java.util.List<com.discord.models.commands.Application>' to match base method */
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final List<? extends Application> mo1invoke() {
if (StoreApplicationCommands.access$shouldReturnApplicationCommands(this.this$0, StoreApplicationCommands.access$getStorePermissions$p(this.this$0).getPermissionsByChannel().get(Long.valueOf(this.$channelId)))) {
return this.this$0.getApplications();
}
List<Application> applications = this.this$0.getApplications();
ArrayList arrayList = new ArrayList();
for (Object obj : applications) {
if (((Application) obj).getBuiltIn()) {
arrayList.add(obj);
}
}
return arrayList;
}
}