sort custom emojis alphabetically (#853)
This commit is contained in:
parent
17189216e3
commit
bfea5119d5
1 changed files with 2 additions and 0 deletions
|
@ -126,6 +126,7 @@ import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -303,6 +304,7 @@ public final class ComposeActivity
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(@NonNull Call<List<Emoji>> call, @NonNull Response<List<Emoji>> response) {
|
public void onResponse(@NonNull Call<List<Emoji>> call, @NonNull Response<List<Emoji>> response) {
|
||||||
emojiList = response.body();
|
emojiList = response.body();
|
||||||
|
Collections.sort(emojiList, (a, b) -> a.getShortcode().toLowerCase().compareTo(b.getShortcode().toLowerCase()));
|
||||||
setEmojiList(emojiList);
|
setEmojiList(emojiList);
|
||||||
cacheInstanceMetadata(activeAccount);
|
cacheInstanceMetadata(activeAccount);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue