improve custom emoji support (#687)
This commit is contained in:
parent
6e43d3fbe8
commit
e8d1b16b39
10 changed files with 102 additions and 121 deletions
|
|
@ -46,7 +46,7 @@ public class CustomEmojiHelper {
|
|||
* @param textView a reference to the textView the emojis will be shown in
|
||||
* @return the text with the shortcodes replaced by EmojiSpans
|
||||
*/
|
||||
public static Spanned emojifyText(Spanned text, List<Emoji> emojis, final TextView textView) {
|
||||
public static Spanned emojifyText(@NonNull Spanned text, @NonNull List<Emoji> emojis, @NonNull final TextView textView) {
|
||||
|
||||
if (!emojis.isEmpty()) {
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ public class CustomEmojiHelper {
|
|||
return text;
|
||||
}
|
||||
|
||||
public static Spanned emojifyString(String string, List<Emoji> emojis, final TextView textView) {
|
||||
public static Spanned emojifyString(@NonNull String string, @NonNull List<Emoji> emojis, @NonNull final TextView textView) {
|
||||
return emojifyText(new SpannedString(string), emojis, textView);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@ public final class ViewDataUtils {
|
|||
.setSenderId(visibleStatus.getAccount().getId())
|
||||
.setRebloggingEnabled(visibleStatus.rebloggingAllowed())
|
||||
.setApplication(visibleStatus.getApplication())
|
||||
.setEmojis(visibleStatus.getEmojis())
|
||||
.setStatusEmojis(visibleStatus.getEmojis())
|
||||
.setAccountEmojis(visibleStatus.getAccount().getEmojis())
|
||||
.createStatusViewData();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue