mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 06:37:30 +00:00
fix natgeotravel
This commit is contained in:
parent
6ecec215b7
commit
6ea6a4b951
@ -12,6 +12,8 @@ android {
|
|||||||
// REMEMBER TO CHANGE versionCode as well
|
// REMEMBER TO CHANGE versionCode as well
|
||||||
// 16.7 is 32
|
// 16.7 is 32
|
||||||
|
|
||||||
|
// next version: fixed natgeotravel mention text problem
|
||||||
|
|
||||||
versionCode 32
|
versionCode 32
|
||||||
versionName '16.7'
|
versionName '16.7'
|
||||||
|
|
||||||
|
@ -962,11 +962,6 @@ public final class MainHelper implements SwipeRefreshLayout.OnRefreshListener {
|
|||||||
boolean ok = false;
|
boolean ok = false;
|
||||||
String action;
|
String action;
|
||||||
|
|
||||||
// arg: follow / restrict / block
|
|
||||||
|
|
||||||
// restrict https://www.instagram.com/web/restrict_action/(un)restrict/
|
|
||||||
// requires form data "target_user_id: <id>"
|
|
||||||
|
|
||||||
protected Void doInBackground(String... rawAction) {
|
protected Void doInBackground(String... rawAction) {
|
||||||
action = rawAction[0];
|
action = rawAction[0];
|
||||||
final String url = "https://www.instagram.com/web/"+
|
final String url = "https://www.instagram.com/web/"+
|
||||||
|
@ -227,7 +227,7 @@ public final class FeedAdapter extends RecyclerView.Adapter<FeedItemViewHolder>
|
|||||||
|
|
||||||
if (!captionEmpty && Utils.hasMentions(postCaption)) {
|
if (!captionEmpty && Utils.hasMentions(postCaption)) {
|
||||||
postCaption = Utils.getMentionText(postCaption);
|
postCaption = Utils.getMentionText(postCaption);
|
||||||
//feedModel.setPostCaption(postCaption);
|
feedModel.setPostCaption(postCaption);
|
||||||
viewHolder.viewerCaption.setText(postCaption, TextView.BufferType.SPANNABLE);
|
viewHolder.viewerCaption.setText(postCaption, TextView.BufferType.SPANNABLE);
|
||||||
viewHolder.viewerCaption.setMentionClickListener(mentionClickListener);
|
viewHolder.viewerCaption.setMentionClickListener(mentionClickListener);
|
||||||
} else {
|
} else {
|
||||||
@ -363,23 +363,8 @@ public final class FeedAdapter extends RecyclerView.Adapter<FeedItemViewHolder>
|
|||||||
final int minTrim = Math.min(255, i);
|
final int minTrim = Math.min(255, i);
|
||||||
if (captionLen <= minTrim) return false;
|
if (captionLen <= minTrim) return false;
|
||||||
|
|
||||||
final CharSequence mentionText = caption.subSequence(0, Math.min(captionLen, minTrim));
|
if (Utils.hasMentions(caption))
|
||||||
final SpannableStringBuilder stringBuilder = new SpannableStringBuilder(mentionText).append(ellipsize);
|
textView.setText(Utils.getMentionText(caption), TextView.BufferType.SPANNABLE);
|
||||||
final int spanLen = stringBuilder.length();
|
|
||||||
|
|
||||||
// fixed @mention...more merging into one span
|
|
||||||
final CommentMentionClickSpan[] spans = stringBuilder.getSpans(0, mentionText.length(), CommentMentionClickSpan.class);
|
|
||||||
if (spans != null) {
|
|
||||||
for (final CommentMentionClickSpan span : spans) {
|
|
||||||
final int spanStart = stringBuilder.getSpanStart(span);
|
|
||||||
stringBuilder.removeSpan(span);
|
|
||||||
stringBuilder.setSpan(span, spanStart, mentionText.length(), 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stringBuilder.setSpan(new StyleSpan(Typeface.BOLD), spanLen - ellipsize.length(), spanLen, 0);
|
|
||||||
|
|
||||||
textView.setText(stringBuilder, bufferType);
|
|
||||||
textView.setCaptionIsExpandable(true);
|
textView.setCaptionIsExpandable(true);
|
||||||
textView.setCaptionIsExpanded(true);
|
textView.setCaptionIsExpanded(true);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user