56 lines
2.3 KiB
Java
56 lines
2.3 KiB
Java
|
package com.discord.widgets.guilds;
|
||
|
|
||
|
import com.discord.models.domain.ModelGuildFolder;
|
||
|
import com.discord.stores.StoreGuildsSorted;
|
||
|
import com.discord.widgets.guilds.WidgetGuildFolderSettingsViewModel;
|
||
|
import d0.z.d.m;
|
||
|
import java.util.Iterator;
|
||
|
import java.util.List;
|
||
|
import rx.functions.Func2;
|
||
|
/* compiled from: WidgetGuildFolderSettingsViewModel.kt */
|
||
|
public final class WidgetGuildFolderSettingsViewModel$Companion$observeStoreState$1<T1, T2, R> implements Func2<List<? extends ModelGuildFolder>, List<? extends StoreGuildsSorted.Entry>, WidgetGuildFolderSettingsViewModel.StoreState> {
|
||
|
public final /* synthetic */ long $folderId;
|
||
|
|
||
|
public WidgetGuildFolderSettingsViewModel$Companion$observeStoreState$1(long j) {
|
||
|
this.$folderId = j;
|
||
|
}
|
||
|
|
||
|
public final WidgetGuildFolderSettingsViewModel.StoreState call(List<ModelGuildFolder> list, List<? extends StoreGuildsSorted.Entry> list2) {
|
||
|
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 WidgetGuildFolderSettingsViewModel.StoreState.Invalid.INSTANCE;
|
||
|
}
|
||
|
m.checkNotNullExpressionValue(list2, "sortedGuilds");
|
||
|
return new WidgetGuildFolderSettingsViewModel.StoreState.Valid(modelGuildFolder, list2);
|
||
|
}
|
||
|
|
||
|
/* 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 */ WidgetGuildFolderSettingsViewModel.StoreState call(List<? extends ModelGuildFolder> list, List<? extends StoreGuildsSorted.Entry> list2) {
|
||
|
return call((List<ModelGuildFolder>) list, list2);
|
||
|
}
|
||
|
}
|