1
0
mirror of https://github.com/KokaKiwi/BarInsta synced 2024-11-22 22:57:29 +00:00
This commit is contained in:
Austin Huang 2021-02-28 15:46:04 -05:00
commit 247e4cc185
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
2 changed files with 1 additions and 13 deletions

View File

@ -17,7 +17,7 @@ public class StoryReplyBroadcastOptions extends BroadcastOptions {
final String reelId) final String reelId)
throws UnsupportedEncodingException { throws UnsupportedEncodingException {
super(clientContext, threadIdOrUserIds, BroadcastItemType.REELSHARE); super(clientContext, threadIdOrUserIds, BroadcastItemType.REELSHARE);
this.text = TextUtils.encode(text); this.text = text;
this.mediaId = mediaId; this.mediaId = mediaId;
this.reelId = reelId; // or user id, usually same this.reelId = reelId; // or user id, usually same
} }

View File

@ -104,18 +104,6 @@ public final class TextUtils {
return (int) ((d2 - d1) / DateUtils.DAY_IN_MILLIS); return (int) ((d2 - d1) / DateUtils.DAY_IN_MILLIS);
} }
@NonNull
public static String encode(final String text) throws UnsupportedEncodingException {
return URLEncoder.encode(text, "UTF-8")
.replaceAll("\\+", "%20")
.replaceAll("%21", "!")
.replaceAll("%27", "'")
.replaceAll("%28", "(")
.replaceAll("%29", ")")
.replaceAll("%7E", "~")
.replaceAll("%0A", "\n");
}
public static List<String> extractUrls(final String text) { public static List<String> extractUrls(final String text) {
if (isEmpty(text)) return Collections.emptyList(); if (isEmpty(text)) return Collections.emptyList();
final Matcher matcher = Patterns.WEB_URL.matcher(text); final Matcher matcher = Patterns.WEB_URL.matcher(text);