Updated emoji set.

Includes display support for more genders, and more notably, skin tones.
These are not currently selectable in the UI, but they will be rendered
properly when other clients send them.
This commit is contained in:
Greyson Parrelli 2018-10-16 09:31:46 -07:00
parent f93a79ae37
commit 1999d09901
13 changed files with 255 additions and 46 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 KiB

After

Width:  |  Height:  |  Size: 333 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 812 KiB

After

Width:  |  Height:  |  Size: 812 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 KiB

After

Width:  |  Height:  |  Size: 604 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 KiB

After

Width:  |  Height:  |  Size: 691 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 873 KiB

After

Width:  |  Height:  |  Size: 866 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 5.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 482 KiB

After

Width:  |  Height:  |  Size: 487 KiB

View File

@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.components.emoji;
public interface EmojiPageModel {
int getIconAttr();
String[] getEmoji();
String[] getDisplayEmoji();
boolean hasSpriteMap();
String getSprite();
boolean isDynamic();

View File

@ -69,7 +69,7 @@ public class EmojiPageView extends FrameLayout {
}
@Override public int getCount() {
return model.getEmoji().length;
return model.getDisplayEmoji().length;
}
@Override
@ -95,7 +95,7 @@ public class EmojiPageView extends FrameLayout {
view = emojiView;
}
view.setEmoji(model.getEmoji()[position]);
view.setEmoji(model.getDisplayEmoji()[position]);
return view;
}
}

File diff suppressed because one or more lines are too long

View File

@ -50,6 +50,10 @@ public class RecentEmojiPageModel implements EmojiPageModel {
return toReversePrimitiveArray(recentlyUsed);
}
@Override public String[] getDisplayEmoji() {
return getEmoji();
}
@Override public boolean hasSpriteMap() {
return false;
}

View File

@ -7,11 +7,17 @@ import android.support.annotation.Nullable;
public class StaticEmojiPageModel implements EmojiPageModel {
@AttrRes private final int iconAttr;
@NonNull private final String[] emoji;
@NonNull private final String[] displayEmoji;
@Nullable private final String sprite;
public StaticEmojiPageModel(@AttrRes int iconAttr, @NonNull String[] emoji, @Nullable String sprite) {
this(iconAttr, emoji, emoji, sprite);
}
public StaticEmojiPageModel(@AttrRes int iconAttr, @NonNull String[] emoji, @NonNull String[] displayEmoji, @Nullable String sprite) {
this.iconAttr = iconAttr;
this.emoji = emoji;
this.displayEmoji = displayEmoji;
this.sprite = sprite;
}
@ -19,19 +25,28 @@ public class StaticEmojiPageModel implements EmojiPageModel {
return iconAttr;
}
@NonNull public String[] getEmoji() {
@Override
public @NonNull String[] getEmoji() {
return emoji;
}
@Override public boolean hasSpriteMap() {
@Override
public @NonNull String[] getDisplayEmoji() {
return displayEmoji;
}
@Override
public boolean hasSpriteMap() {
return sprite != null;
}
@Override @Nullable public String getSprite() {
@Override
public @Nullable String getSprite() {
return sprite;
}
@Override public boolean isDynamic() {
@Override
public boolean isDynamic() {
return false;
}
}