70 lines
3.6 KiB
Java
70 lines
3.6 KiB
Java
package com.discord.widgets.chat.list.actions;
|
|
|
|
import com.discord.api.channel.Channel;
|
|
import com.discord.models.domain.emoji.EmojiSet;
|
|
import com.discord.models.guild.Guild;
|
|
import com.discord.models.message.Message;
|
|
import com.discord.models.user.User;
|
|
import com.discord.stores.StoreEmoji;
|
|
import com.discord.stores.StoreStream;
|
|
import com.discord.utilities.textprocessing.MessageUnparser;
|
|
import d0.z.d.m;
|
|
import j0.k.b;
|
|
import java.util.Map;
|
|
import rx.Observable;
|
|
import rx.functions.Func3;
|
|
/* compiled from: WidgetChatListActions.kt */
|
|
public final class WidgetChatListActions$editMessage$1<T, R> implements b<Map<Long, ? extends Channel>, Observable<? extends CharSequence>> {
|
|
public final /* synthetic */ Message $message;
|
|
|
|
/* compiled from: WidgetChatListActions.kt */
|
|
/* renamed from: com.discord.widgets.chat.list.actions.WidgetChatListActions$editMessage$1$1 reason: invalid class name */
|
|
public static final class AnonymousClass1<T1, T2, T3, R> implements Func3<Map<Long, ? extends User>, Map<Long, ? extends Guild>, EmojiSet, CharSequence> {
|
|
public final /* synthetic */ Map $channels;
|
|
public final /* synthetic */ long $guildId;
|
|
public final /* synthetic */ WidgetChatListActions$editMessage$1 this$0;
|
|
|
|
public AnonymousClass1(WidgetChatListActions$editMessage$1 widgetChatListActions$editMessage$1, long j, Map map) {
|
|
this.this$0 = widgetChatListActions$editMessage$1;
|
|
this.$guildId = j;
|
|
this.$channels = map;
|
|
}
|
|
|
|
public final CharSequence call(Map<Long, ? extends User> map, Map<Long, Guild> map2, EmojiSet emojiSet) {
|
|
String content = this.this$0.$message.getContent();
|
|
if (content == null) {
|
|
content = "";
|
|
}
|
|
Map map3 = this.$channels;
|
|
m.checkNotNullExpressionValue(map3, "channels");
|
|
m.checkNotNullExpressionValue(map, "users");
|
|
m.checkNotNullExpressionValue(emojiSet, "emojiSet");
|
|
return MessageUnparser.unparse(content, map2.get(Long.valueOf(this.$guildId)), map3, map, emojiSet);
|
|
}
|
|
|
|
/* 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, java.lang.Object] */
|
|
@Override // rx.functions.Func3
|
|
public /* bridge */ /* synthetic */ CharSequence call(Map<Long, ? extends User> map, Map<Long, ? extends Guild> map2, EmojiSet emojiSet) {
|
|
return call(map, (Map<Long, Guild>) map2, emojiSet);
|
|
}
|
|
}
|
|
|
|
public WidgetChatListActions$editMessage$1(Message message) {
|
|
this.$message = message;
|
|
}
|
|
|
|
/* 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 // j0.k.b
|
|
public /* bridge */ /* synthetic */ Observable<? extends CharSequence> call(Map<Long, ? extends Channel> map) {
|
|
return call((Map<Long, Channel>) map);
|
|
}
|
|
|
|
public final Observable<? extends CharSequence> call(Map<Long, Channel> map) {
|
|
Channel channel = map.get(Long.valueOf(this.$message.getChannelId()));
|
|
long f = channel != null ? channel.f() : 0;
|
|
StoreStream.Companion companion = StoreStream.Companion;
|
|
return Observable.i(companion.getUsers().observeAllUsers(), companion.getGuilds().observeGuilds(), StoreEmoji.getEmojiSet$default(companion.getEmojis(), f, this.$message.getChannelId(), false, false, 12, null), new AnonymousClass1(this, f, map));
|
|
}
|
|
}
|