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.
fork-5.53.8
Greyson Parrelli 2018-10-16 09:31:46 -07:00
rodzic f93a79ae37
commit 1999d09901
13 zmienionych plików z 255 dodań i 46 usunięć

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 337 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 333 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 812 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 812 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 610 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 604 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 694 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 691 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 873 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 866 KiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 2.0 MiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 5.1 MiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 1.1 MiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 1.1 MiB

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 482 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 487 KiB

Wyświetl plik

@ -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();

Wyświetl plik

@ -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

Wyświetl plik

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

Wyświetl plik

@ -7,31 +7,46 @@ 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 = iconAttr;
this.emoji = emoji;
this.sprite = 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;
}
public int getIconAttr() {
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;
}
}