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.ApplicationCommand;
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$observeQueryCommands$1 extends o implements Function0<List<? extends ApplicationCommand>> {
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$observeQueryCommands$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.ApplicationCommand>' to match base method */
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final List<? extends ApplicationCommand> 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.getQueryCommands();
}
List<ApplicationCommand> queryCommands = this.this$0.getQueryCommands();
ArrayList arrayList = new ArrayList();
for (Object obj : queryCommands) {
if (((ApplicationCommand) obj).getBuiltIn()) {
arrayList.add(obj);
}
}
return arrayList;
}
}