20 lines
1.1 KiB
Java
20 lines
1.1 KiB
Java
|
package com.discord.widgets.friends;
|
||
|
|
||
|
import com.discord.utilities.user.UserUtils;
|
||
|
import com.discord.widgets.friends.FriendsListViewModel;
|
||
|
import java.util.Comparator;
|
||
|
/* compiled from: FriendsListViewModel.kt */
|
||
|
public final class FriendsListViewModel$getItems$sortedPendingItems$1<T> implements Comparator<FriendsListViewModel.Item.PendingFriendRequest> {
|
||
|
public static final FriendsListViewModel$getItems$sortedPendingItems$1 INSTANCE = new FriendsListViewModel$getItems$sortedPendingItems$1();
|
||
|
|
||
|
public final int compare(FriendsListViewModel.Item.PendingFriendRequest pendingFriendRequest, FriendsListViewModel.Item.PendingFriendRequest pendingFriendRequest2) {
|
||
|
if (pendingFriendRequest.getRelationshipType() == 3 && pendingFriendRequest2.getRelationshipType() == 4) {
|
||
|
return -1;
|
||
|
}
|
||
|
if (pendingFriendRequest.getRelationshipType() == 4 && pendingFriendRequest2.getRelationshipType() == 3) {
|
||
|
return 1;
|
||
|
}
|
||
|
return UserUtils.INSTANCE.compareUserNames(pendingFriendRequest.getUser(), pendingFriendRequest2.getUser());
|
||
|
}
|
||
|
}
|