Emoji shortname conversion

This commit is contained in:
Eugen Rochko 2017-03-07 12:11:18 +01:00
parent d9f0b3c99e
commit 03d9701669
3 changed files with 1866 additions and 2 deletions

View File

@ -21,7 +21,7 @@ android {
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,8 @@ package com.keylesspalace.tusky;
import android.support.annotation.Nullable;
import android.text.Spanned;
import com.emojione.Emojione;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@ -273,7 +275,7 @@ public class Status {
status = reblog;
status.setRebloggedByDisplayName(displayName);
} else {
Spanned contentPlus = HtmlUtils.fromHtml(content);
Spanned contentPlus = HtmlUtils.fromHtml(Emojione.shortnameToUnicode(content, false));
status = new Status(
id, accountId, displayName, username, contentPlus, avatar, createdAt,
reblogged, favourited, visibility);