mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Reverse the change of unescaping HTML because it also remove all the HTML tags. Fixed subreddit name and post time overlapping. Fixed menu item text not shown in MainActivity.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
|
||||
import android.os.AsyncTask;
|
||||
import android.text.Html;
|
||||
import android.util.Log;
|
||||
|
||||
import org.json.JSONArray;
|
||||
@@ -117,7 +116,7 @@ class ParseComment {
|
||||
boolean isSubmitter = data.getBoolean(JSONUtils.IS_SUBMITTER_KEY);
|
||||
String commentContent = "";
|
||||
if(!data.isNull(JSONUtils.BODY_HTML_KEY)) {
|
||||
commentContent = Html.fromHtml(data.getString(JSONUtils.BODY_HTML_KEY).trim()).toString();
|
||||
commentContent = data.getString(JSONUtils.BODY_HTML_KEY).trim();
|
||||
}
|
||||
String permalink = data.getString(JSONUtils.PERMALINK_KEY);
|
||||
int score = data.getInt(JSONUtils.SCORE_KEY);
|
||||
|
@@ -1,7 +1,6 @@
|
||||
package ml.docilealligator.infinityforreddit;
|
||||
|
||||
import android.os.AsyncTask;
|
||||
import android.text.Html;
|
||||
import android.util.Log;
|
||||
|
||||
import org.json.JSONArray;
|
||||
@@ -63,6 +62,7 @@ class ParsePost {
|
||||
for(int i = 0; i < allData.length(); i++) {
|
||||
String kind = allData.getJSONObject(i).getString(JSONUtils.KIND_KEY);
|
||||
if(!kind.equals("t3")) {
|
||||
//It's a comment
|
||||
continue;
|
||||
}
|
||||
JSONObject data = allData.getJSONObject(i).getJSONObject(JSONUtils.DATA_KEY);
|
||||
@@ -149,7 +149,7 @@ class ParsePost {
|
||||
if(data.isNull(JSONUtils.SELFTEXT_HTML_KEY)) {
|
||||
post.setSelfText("");
|
||||
} else {
|
||||
post.setSelfText(Html.fromHtml(data.getString(JSONUtils.SELFTEXT_HTML_KEY).trim()).toString());
|
||||
post.setSelfText(data.getString(JSONUtils.SELFTEXT_HTML_KEY).trim());
|
||||
}
|
||||
bestPostData.add(post);
|
||||
} else {
|
||||
@@ -162,7 +162,7 @@ class ParsePost {
|
||||
if(data.isNull(JSONUtils.SELFTEXT_HTML_KEY)) {
|
||||
linkPost.setSelfText("");
|
||||
} else {
|
||||
linkPost.setSelfText(Html.fromHtml(data.getString(JSONUtils.SELFTEXT_HTML_KEY).trim()).toString());
|
||||
linkPost.setSelfText(data.getString(JSONUtils.SELFTEXT_HTML_KEY).trim());
|
||||
}
|
||||
bestPostData.add(linkPost);
|
||||
}
|
||||
@@ -253,7 +253,7 @@ class ParsePost {
|
||||
if(data.isNull(JSONUtils.SELFTEXT_HTML_KEY)) {
|
||||
textWithImagePost.setSelfText("");
|
||||
} else {
|
||||
textWithImagePost.setSelfText(Html.fromHtml(data.getString(JSONUtils.SELFTEXT_HTML_KEY).trim()).toString());
|
||||
textWithImagePost.setSelfText(data.getString(JSONUtils.SELFTEXT_HTML_KEY).trim());
|
||||
}
|
||||
bestPostData.add(textWithImagePost);
|
||||
} else {
|
||||
@@ -266,7 +266,7 @@ class ParsePost {
|
||||
if(data.isNull(JSONUtils.SELFTEXT_HTML_KEY)) {
|
||||
linkPost.setSelfText("");
|
||||
} else {
|
||||
linkPost.setSelfText(Html.fromHtml(data.getString(JSONUtils.SELFTEXT_HTML_KEY).trim()).toString());
|
||||
linkPost.setSelfText(data.getString(JSONUtils.SELFTEXT_HTML_KEY).trim());
|
||||
}
|
||||
|
||||
linkPost.setPreviewWidth(previewWidth);
|
||||
|
Reference in New Issue
Block a user