fixed status escaping

This commit is contained in:
Mariotaku Lee 2016-03-22 21:13:17 +08:00
parent 3922219794
commit 5cc46bc49e
2 changed files with 3 additions and 3 deletions

View File

@ -914,7 +914,7 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
final ParcelableUser user = getUser(); final ParcelableUser user = getUser();
if (twitter == null || user == null) return; if (twitter == null || user == null) return;
final boolean isMyself = user.account_key.equals(user.key); final boolean isMyself = user.account_key.maybeEquals(user.key);
final MenuItem mentionItem = menu.findItem(R.id.mention); final MenuItem mentionItem = menu.findItem(R.id.mention);
if (mentionItem != null) { if (mentionItem != null) {
final String displayName = UserColorNameManager.decideDisplayName(user.nickname, final String displayName = UserColorNameManager.decideDisplayName(user.nickname,
@ -1304,7 +1304,7 @@ public class UserFragment extends BaseSupportFragment implements OnClickListener
break; break;
} }
case R.id.follow: { case R.id.follow: {
if (user.account_key.equals(user.key)) { if (user.account_key.maybeEquals(user.key)) {
IntentUtils.openProfileEditor(getActivity(), user.account_key); IntentUtils.openProfileEditor(getActivity(), user.account_key);
break; break;
} }

View File

@ -240,7 +240,7 @@ public class InternalTwitterContentUtils {
public static Pair<String, List<SpanItem>> formatStatusTextWithIndices(final Status status) { public static Pair<String, List<SpanItem>> formatStatusTextWithIndices(final Status status) {
if (status == null) return null; if (status == null) return null;
final HtmlBuilder builder = new HtmlBuilder(status.getText(), false, true, true); final HtmlBuilder builder = new HtmlBuilder(status.getText(), false, true, false);
parseEntities(builder, status); parseEntities(builder, status);
return builder.buildWithIndices(); return builder.buildWithIndices();
} }