47 lines
1.8 KiB
Java
47 lines
1.8 KiB
Java
package com.discord.widgets.emoji;
|
|
|
|
import com.discord.models.guild.Guild;
|
|
import com.discord.stores.StoreEmojiCustom;
|
|
import com.discord.stores.StoreGuilds;
|
|
import com.discord.utilities.textprocessing.node.EmojiNode;
|
|
import java.util.Iterator;
|
|
import java.util.Map;
|
|
import java.util.concurrent.Callable;
|
|
/* compiled from: EmojiSheetViewModel.kt */
|
|
public final class EmojiSheetViewModel$Companion$getGuildForCustomEmoji$1<V> implements Callable<Guild> {
|
|
public final /* synthetic */ EmojiNode.EmojiIdAndType.Custom $emoji;
|
|
public final /* synthetic */ StoreEmojiCustom $storeEmojiCustom;
|
|
public final /* synthetic */ StoreGuilds $storeGuilds;
|
|
|
|
public EmojiSheetViewModel$Companion$getGuildForCustomEmoji$1(StoreEmojiCustom storeEmojiCustom, EmojiNode.EmojiIdAndType.Custom custom, StoreGuilds storeGuilds) {
|
|
this.$storeEmojiCustom = storeEmojiCustom;
|
|
this.$emoji = custom;
|
|
this.$storeGuilds = storeGuilds;
|
|
}
|
|
|
|
@Override // java.util.concurrent.Callable
|
|
public final Guild call() {
|
|
Object obj;
|
|
Iterator<T> it = this.$storeEmojiCustom.getAllGuildEmoji().entrySet().iterator();
|
|
while (true) {
|
|
if (!it.hasNext()) {
|
|
obj = null;
|
|
break;
|
|
}
|
|
obj = it.next();
|
|
Map.Entry entry = (Map.Entry) obj;
|
|
((Number) entry.getKey()).longValue();
|
|
if (((Map) entry.getValue()).keySet().contains(Long.valueOf(this.$emoji.getId()))) {
|
|
break;
|
|
}
|
|
}
|
|
Map.Entry entry2 = (Map.Entry) obj;
|
|
if (entry2 == null) {
|
|
return null;
|
|
}
|
|
long longValue = ((Number) entry2.getKey()).longValue();
|
|
Map map = (Map) entry2.getValue();
|
|
return this.$storeGuilds.getGuilds().get(Long.valueOf(longValue));
|
|
}
|
|
}
|