forked from Juby210/discord-jadx
56 lines
2.2 KiB
Java
56 lines
2.2 KiB
Java
package com.discord.widgets.guilds.contextmenu;
|
|
|
|
import com.discord.models.domain.ModelGuildFolder;
|
|
import com.discord.widgets.guilds.contextmenu.FolderContextMenuViewModel;
|
|
import d0.z.d.m;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import java.util.Set;
|
|
import rx.functions.Func2;
|
|
/* compiled from: FolderContextMenuViewModel.kt */
|
|
public final class FolderContextMenuViewModel$Companion$observeStoreState$1<T1, T2, R> implements Func2<List<? extends ModelGuildFolder>, Set<? extends Long>, FolderContextMenuViewModel.StoreState> {
|
|
public final /* synthetic */ long $folderId;
|
|
|
|
public FolderContextMenuViewModel$Companion$observeStoreState$1(long j) {
|
|
this.$folderId = j;
|
|
}
|
|
|
|
public final FolderContextMenuViewModel.StoreState call(List<ModelGuildFolder> list, Set<Long> set) {
|
|
Object obj;
|
|
boolean z2;
|
|
m.checkNotNullExpressionValue(list, "guildFolders");
|
|
Iterator<T> it = list.iterator();
|
|
while (true) {
|
|
if (!it.hasNext()) {
|
|
obj = null;
|
|
break;
|
|
}
|
|
obj = it.next();
|
|
Long id2 = ((ModelGuildFolder) obj).getId();
|
|
if (id2 != null && id2.longValue() == this.$folderId) {
|
|
z2 = true;
|
|
continue;
|
|
} else {
|
|
z2 = false;
|
|
continue;
|
|
}
|
|
if (z2) {
|
|
break;
|
|
}
|
|
}
|
|
ModelGuildFolder modelGuildFolder = (ModelGuildFolder) obj;
|
|
if (modelGuildFolder == null) {
|
|
return FolderContextMenuViewModel.StoreState.Invalid.INSTANCE;
|
|
}
|
|
m.checkNotNullExpressionValue(set, "unreadGuildIds");
|
|
return new FolderContextMenuViewModel.StoreState.Valid(modelGuildFolder, set);
|
|
}
|
|
|
|
/* 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] */
|
|
@Override // rx.functions.Func2
|
|
public /* bridge */ /* synthetic */ FolderContextMenuViewModel.StoreState call(List<? extends ModelGuildFolder> list, Set<? extends Long> set) {
|
|
return call((List<ModelGuildFolder>) list, (Set<Long>) set);
|
|
}
|
|
}
|