mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 09:49:30 +01:00
Add vertical scroll to Emoji Keyboard.
This commit is contained in:
@@ -45,7 +45,7 @@ final class ReactWithAnyEmojiRepository {
|
||||
|
||||
emojiPages.addAll(Stream.of(EmojiSource.getLatest().getDisplayPages())
|
||||
.filterNot(p -> p.getIconAttr() == EmojiCategory.EMOTICONS.getIcon())
|
||||
.map(page -> new ReactWithAnyEmojiPage(Collections.singletonList(new ReactWithAnyEmojiPageBlock(getCategoryLabel(page.getIconAttr()), page))))
|
||||
.map(page -> new ReactWithAnyEmojiPage(Collections.singletonList(new ReactWithAnyEmojiPageBlock(EmojiCategory.getCategoryLabel(page.getIconAttr()), page))))
|
||||
.toList());
|
||||
}
|
||||
|
||||
@@ -89,29 +89,4 @@ final class ReactWithAnyEmojiRepository {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private @StringRes int getCategoryLabel(@AttrRes int iconAttr) {
|
||||
switch (iconAttr) {
|
||||
case R.attr.emoji_category_people:
|
||||
return R.string.ReactWithAnyEmojiBottomSheetDialogFragment__smileys_and_people;
|
||||
case R.attr.emoji_category_nature:
|
||||
return R.string.ReactWithAnyEmojiBottomSheetDialogFragment__nature;
|
||||
case R.attr.emoji_category_foods:
|
||||
return R.string.ReactWithAnyEmojiBottomSheetDialogFragment__food;
|
||||
case R.attr.emoji_category_activity:
|
||||
return R.string.ReactWithAnyEmojiBottomSheetDialogFragment__activities;
|
||||
case R.attr.emoji_category_places:
|
||||
return R.string.ReactWithAnyEmojiBottomSheetDialogFragment__places;
|
||||
case R.attr.emoji_category_objects:
|
||||
return R.string.ReactWithAnyEmojiBottomSheetDialogFragment__objects;
|
||||
case R.attr.emoji_category_symbols:
|
||||
return R.string.ReactWithAnyEmojiBottomSheetDialogFragment__symbols;
|
||||
case R.attr.emoji_category_flags:
|
||||
return R.string.ReactWithAnyEmojiBottomSheetDialogFragment__flags;
|
||||
case R.attr.emoji_category_emoticons:
|
||||
return R.string.ReactWithAnyEmojiBottomSheetDialogFragment__emoticons;
|
||||
default:
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user