sort custom emojis alphabetically (#853)

main
Gian Sass 6 years ago committed by Ivan Kupalov
parent ee8dc7831f
commit d4547a04dc
  1. 2
      app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java

@ -126,6 +126,7 @@ import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
@ -303,6 +304,7 @@ public final class ComposeActivity
@Override
public void onResponse(@NonNull Call<List<Emoji>> call, @NonNull Response<List<Emoji>> response) {
emojiList = response.body();
Collections.sort(emojiList, (a, b) -> a.getShortcode().toLowerCase().compareTo(b.getShortcode().toLowerCase()));
setEmojiList(emojiList);
cacheInstanceMetadata(activeAccount);
}

Loading…
Cancel
Save