76 lines
3.4 KiB
Java
76 lines
3.4 KiB
Java
package com.discord.stores;
|
|
|
|
import com.discord.api.directory.DirectoryEntry;
|
|
import com.discord.stores.utilities.RestCallState;
|
|
import com.discord.stores.utilities.Success;
|
|
import d0.t.n;
|
|
import d0.z.d.m;
|
|
import d0.z.d.o;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import kotlin.Unit;
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: StoreDirectories.kt */
|
|
public final class StoreDirectories$removeServerFromDirectory$2 extends o implements Function1<RestCallState<? extends DirectoryEntry>, Unit> {
|
|
public final /* synthetic */ long $channelId;
|
|
public final /* synthetic */ long $guildId;
|
|
public final /* synthetic */ StoreDirectories this$0;
|
|
|
|
/* compiled from: StoreDirectories.kt */
|
|
/* renamed from: com.discord.stores.StoreDirectories$removeServerFromDirectory$2$1 reason: invalid class name */
|
|
public static final class AnonymousClass1 extends o implements Function0<Unit> {
|
|
public final /* synthetic */ StoreDirectories$removeServerFromDirectory$2 this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public AnonymousClass1(StoreDirectories$removeServerFromDirectory$2 storeDirectories$removeServerFromDirectory$2) {
|
|
super(0);
|
|
this.this$0 = storeDirectories$removeServerFromDirectory$2;
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final void mo1invoke() {
|
|
Map access$getDirectoriesMap$p = StoreDirectories.access$getDirectoriesMap$p(this.this$0.this$0);
|
|
Long valueOf = Long.valueOf(this.this$0.$channelId);
|
|
RestCallState restCallState = (RestCallState) StoreDirectories.access$getDirectoriesMap$p(this.this$0.this$0).get(Long.valueOf(this.this$0.$channelId));
|
|
List list = restCallState != null ? (List) restCallState.invoke() : null;
|
|
if (list == null) {
|
|
list = n.emptyList();
|
|
}
|
|
ArrayList arrayList = new ArrayList();
|
|
for (Object obj : list) {
|
|
if (((DirectoryEntry) obj).d().g() != this.this$0.$guildId) {
|
|
arrayList.add(obj);
|
|
}
|
|
}
|
|
access$getDirectoriesMap$p.put(valueOf, new Success(arrayList));
|
|
this.this$0.this$0.markChanged();
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public StoreDirectories$removeServerFromDirectory$2(StoreDirectories storeDirectories, long j, long j2) {
|
|
super(1);
|
|
this.this$0 = storeDirectories;
|
|
this.$channelId = j;
|
|
this.$guildId = j2;
|
|
}
|
|
|
|
/* 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(RestCallState<? extends DirectoryEntry> restCallState) {
|
|
invoke((RestCallState<DirectoryEntry>) restCallState);
|
|
return Unit.a;
|
|
}
|
|
|
|
public final void invoke(RestCallState<DirectoryEntry> restCallState) {
|
|
m.checkNotNullParameter(restCallState, "request");
|
|
if (restCallState instanceof Success) {
|
|
StoreDirectories.access$getDispatcher$p(this.this$0).schedule(new AnonymousClass1(this));
|
|
}
|
|
}
|
|
}
|