mirror of
https://github.com/nuclearfog/Shitter.git
synced 2025-01-01 04:17:21 +01:00
tweet bug fix
This commit is contained in:
parent
9b8c298af8
commit
31456a9331
@ -59,7 +59,7 @@ class TweetV1 implements Tweet {
|
|||||||
private String location = "";
|
private String location = "";
|
||||||
private String replyName = "";
|
private String replyName = "";
|
||||||
private String coordinates = "";
|
private String coordinates = "";
|
||||||
private String[] mediaLinks;
|
private String[] mediaLinks = {};
|
||||||
private String mediaType = "";
|
private String mediaType = "";
|
||||||
|
|
||||||
|
|
||||||
@ -76,6 +76,7 @@ class TweetV1 implements Tweet {
|
|||||||
timestamp = StringTools.getTime(json.optString("created_at"));
|
timestamp = StringTools.getTime(json.optString("created_at"));
|
||||||
source = StringTools.getSource(json.optString("source"));
|
source = StringTools.getSource(json.optString("source"));
|
||||||
String replyName = json.optString("in_reply_to_screen_name");
|
String replyName = json.optString("in_reply_to_screen_name");
|
||||||
|
String userMentions = StringTools.getUserMentions(text);
|
||||||
|
|
||||||
JSONObject locationJson = json.optJSONObject("place");
|
JSONObject locationJson = json.optJSONObject("place");
|
||||||
JSONObject coordinateJson = json.optJSONObject("coordinates");
|
JSONObject coordinateJson = json.optJSONObject("coordinates");
|
||||||
@ -101,9 +102,11 @@ class TweetV1 implements Tweet {
|
|||||||
}
|
}
|
||||||
if (!replyName.equals("null")) {
|
if (!replyName.equals("null")) {
|
||||||
this.replyName = '@' + replyName;
|
this.replyName = '@' + replyName;
|
||||||
userMentions = author.getScreenname() + " @" + replyName + ' ' + StringTools.getUserMentions(text);
|
}
|
||||||
|
if (author.isCurrentUser()) {
|
||||||
|
this.userMentions = userMentions;
|
||||||
} else {
|
} else {
|
||||||
userMentions = author.getScreenname() + ' ' + StringTools.getUserMentions(text);
|
this.userMentions = author.getScreenname() + ' ' + userMentions;
|
||||||
}
|
}
|
||||||
if (user_retweet != null)
|
if (user_retweet != null)
|
||||||
retweetId = user_retweet.optLong("id");
|
retweetId = user_retweet.optLong("id");
|
||||||
@ -184,13 +187,10 @@ class TweetV1 implements Tweet {
|
|||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Uri[] getMediaLinks() {
|
public Uri[] getMediaLinks() {
|
||||||
if (mediaLinks != null) {
|
Uri[] result = new Uri[mediaLinks.length];
|
||||||
Uri[] result = new Uri[mediaLinks.length];
|
for (int i = 0; i < result.length; i++)
|
||||||
for (int i = 0; i < result.length; i++)
|
result[i] = Uri.parse(mediaLinks[i]);
|
||||||
result[i] = Uri.parse(mediaLinks[i]);
|
return result;
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return new Uri[0];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user