forked from Juby210/discord-jadx
60 lines
2.5 KiB
Java
60 lines
2.5 KiB
Java
package com.discord.widgets.directories;
|
|
|
|
import c0.t.g0;
|
|
import c0.t.h0;
|
|
import c0.t.i0;
|
|
import c0.t.m;
|
|
import c0.t.u;
|
|
import c0.z.d.o;
|
|
import com.discord.api.channel.Channel;
|
|
import com.discord.api.channel.ChannelUtils;
|
|
import com.discord.models.hubs.DirectoryEntryCategory;
|
|
import com.discord.widgets.directories.WidgetDirectoriesViewModel;
|
|
import java.util.Collection;
|
|
import java.util.Iterator;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import kotlin.Pair;
|
|
import kotlin.jvm.functions.Function0;
|
|
/* compiled from: WidgetDirectoriesViewModel.kt */
|
|
public final class WidgetDirectoriesViewModel$ViewState$mappedTabs$2 extends o implements Function0<List<? extends Pair<? extends DirectoryEntryCategory, ? extends Integer>>> {
|
|
public final /* synthetic */ WidgetDirectoriesViewModel.ViewState this$0;
|
|
|
|
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
|
|
public WidgetDirectoriesViewModel$ViewState$mappedTabs$2(WidgetDirectoriesViewModel.ViewState viewState) {
|
|
super(0);
|
|
this.this$0 = viewState;
|
|
}
|
|
|
|
/* Return type fixed from 'java.util.List<kotlin.Pair<com.discord.models.hubs.DirectoryEntryCategory, java.lang.Integer>>' to match base method */
|
|
@Override // kotlin.jvm.functions.Function0
|
|
/* renamed from: invoke */
|
|
public final List<? extends Pair<? extends DirectoryEntryCategory, ? extends Integer>> mo17invoke() {
|
|
Map map;
|
|
List listOf = m.listOf(c0.o.to(DirectoryEntryCategory.Home, 0));
|
|
Map<Integer, Integer> invoke = this.this$0.getTabs().invoke();
|
|
if (invoke != null) {
|
|
map = new LinkedHashMap(g0.mapCapacity(invoke.size()));
|
|
Iterator<T> it = invoke.entrySet().iterator();
|
|
while (it.hasNext()) {
|
|
Map.Entry entry = (Map.Entry) it.next();
|
|
DirectoryEntryCategory.Companion companion = DirectoryEntryCategory.Companion;
|
|
int intValue = ((Number) entry.getKey()).intValue();
|
|
Channel channel = this.this$0.getChannel();
|
|
boolean z2 = true;
|
|
if (channel == null || !ChannelUtils.t(channel)) {
|
|
z2 = false;
|
|
}
|
|
map.put(companion.findByKey(intValue, z2), entry.getValue());
|
|
}
|
|
} else {
|
|
map = null;
|
|
}
|
|
if (map == null) {
|
|
map = h0.emptyMap();
|
|
}
|
|
return u.plus((Collection) listOf, (Iterable) i0.toList(map));
|
|
}
|
|
}
|