24 lines
798 B
Java
24 lines
798 B
Java
package com.discord.widgets.guilds.invite;
|
|
|
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
|
import com.discord.api.channel.Channel;
|
|
import d0.z.d.m;
|
|
import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.Map;
|
|
/* compiled from: TargetChannelSelector.kt */
|
|
public final class TargetChannelSelector {
|
|
public final Channel getTargetChannel(Map<Long, Channel> map, Long l) {
|
|
m.checkNotNullParameter(map, "invitableChannels");
|
|
ArrayList arrayList = new ArrayList(map.values());
|
|
Collections.sort(arrayList, AnimatableValueParser.K0(Channel.Companion));
|
|
if (map.containsKey(l)) {
|
|
return map.get(l);
|
|
}
|
|
if (!arrayList.isEmpty()) {
|
|
return (Channel) arrayList.get(0);
|
|
}
|
|
return null;
|
|
}
|
|
}
|