fix crash in ComposeActivity when loading no Emojis

This commit is contained in:
Conny Duck 2018-11-27 21:07:15 +01:00
parent fed52398a6
commit f185c9d379

View file

@ -313,6 +313,9 @@ public final class ComposeActivity
@Override
public void onResponse(@NonNull Call<List<Emoji>> call, @NonNull Response<List<Emoji>> response) {
emojiList = response.body();
if(emojiList == null) {
emojiList = Collections.emptyList();
}
Collections.sort(emojiList, (a, b) -> a.getShortcode().toLowerCase().compareTo(b.getShortcode().toLowerCase()));
setEmojiList(emojiList);
cacheInstanceMetadata(activeAccount);