forked from Juby210/discord-jadx
26 lines
1.1 KiB
Java
26 lines
1.1 KiB
Java
package com.discord.widgets.directories;
|
|
|
|
import c0.u.a;
|
|
import com.discord.models.hubs.DirectoryEntryCategory;
|
|
import java.util.Comparator;
|
|
/* compiled from: Comparisons.kt */
|
|
public final class WidgetDirectoriesViewModel$ViewState$allDirectoryEntryData$2$$special$$inlined$sortedBy$1<T> implements Comparator<T> {
|
|
@Override // java.util.Comparator
|
|
public final int compare(T t, T t2) {
|
|
T t3 = t;
|
|
DirectoryEntryCategory.Companion companion = DirectoryEntryCategory.Companion;
|
|
int idealSize = companion.findByKey(t3.getEntry().e(), false).getIdealSize();
|
|
Integer a = t3.getEntry().d().a();
|
|
int i = Integer.MAX_VALUE;
|
|
int intValue = a != null ? a.intValue() : Integer.MAX_VALUE;
|
|
Integer valueOf = Integer.valueOf(Math.abs(intValue - idealSize) / intValue);
|
|
T t4 = t2;
|
|
int idealSize2 = companion.findByKey(t4.getEntry().e(), false).getIdealSize();
|
|
Integer a2 = t4.getEntry().d().a();
|
|
if (a2 != null) {
|
|
i = a2.intValue();
|
|
}
|
|
return a.compareValues(valueOf, Integer.valueOf(Math.abs(i - idealSize2) / i));
|
|
}
|
|
}
|