Emoji shortname conversion

main
Eugen Rochko 7 years ago
parent d9f0b3c99e
commit 03d9701669
  1. 2
      app/build.gradle
  2. 1862
      app/src/main/java/com/emojione/Emojione.java
  3. 4
      app/src/main/java/com/keylesspalace/tusky/Status.java

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

File diff suppressed because it is too large Load Diff

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

Loading…
Cancel
Save