22 lines
1.0 KiB
Java
22 lines
1.0 KiB
Java
package com.discord.api.channel;
|
|
|
|
import com.discord.utilities.message.MessageUtils;
|
|
import java.util.Comparator;
|
|
import java.util.Map;
|
|
/* compiled from: ChannelUtils.kt */
|
|
public final class ChannelUtils$getSortByMostRecent$1<T> implements Comparator<Channel> {
|
|
public final /* synthetic */ Map $mostRecentMessageIds;
|
|
|
|
public ChannelUtils$getSortByMostRecent$1(Map map) {
|
|
this.$mostRecentMessageIds = map;
|
|
}
|
|
|
|
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
|
|
@Override // java.util.Comparator
|
|
public int compare(Channel channel, Channel channel2) {
|
|
long h = channel.h();
|
|
long h2 = channel2.h();
|
|
return MessageUtils.compareMessages(this.$mostRecentMessageIds.containsKey(Long.valueOf(h2)) ? (Long) this.$mostRecentMessageIds.get(Long.valueOf(h2)) : Long.valueOf(h2), this.$mostRecentMessageIds.containsKey(Long.valueOf(h)) ? (Long) this.$mostRecentMessageIds.get(Long.valueOf(h)) : Long.valueOf(h));
|
|
}
|
|
}
|