Fix an issue when instances don't support the feature for verified links

This commit is contained in:
stom79 2018-09-27 19:47:55 +02:00
parent f61ad952fc
commit cfb12ff9fe
2 changed files with 6 additions and 2 deletions

View File

@ -742,7 +742,6 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
}else {
spannableValueString = Helper.clickableElementsDescription(ShowAccountActivity.this, value, account.getEmojis());
}
valueView.setText(spannableValueString, TextView.BufferType.SPANNABLE);
valueView.setMovementMethod(LinkMovementMethod.getInstance());
labelView.setText(label);

View File

@ -2487,7 +2487,12 @@ public class API {
if( fields != null){
for(int j = 0 ; j < fields.length() ; j++){
fieldsMap.put(fields.getJSONObject(j).getString("name"),fields.getJSONObject(j).getString("value"));
fieldsMapVerified.put(fields.getJSONObject(j).getString("name"),(fields.getJSONObject(j).getString("verified_at")!= null && !fields.getJSONObject(j).getString("verified_at").equals("null")));
try {
fieldsMapVerified.put(fields.getJSONObject(j).getString("name"),(fields.getJSONObject(j).getString("verified_at")!= null && !fields.getJSONObject(j).getString("verified_at").equals("null")));
}catch (Exception e){
fieldsMapVerified.put(fields.getJSONObject(j).getString("name"),false);
}
}
}
account.setFields(fieldsMap);