mirror of
https://framagit.org/tom79/fedilab-tube
synced 2025-06-05 21:09:11 +02:00
Display account
This commit is contained in:
@ -268,14 +268,19 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi
|
||||
|
||||
SpannableString spannableString;
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||
spannableString = new SpannableString(Html.fromHtml(account.getNote(), FROM_HTML_MODE_LEGACY));
|
||||
else
|
||||
spannableString = new SpannableString(Html.fromHtml(account.getNote()));
|
||||
if( account.getNote() != null && account.getNote().compareTo("null") != 0 && account.getNote().trim().length() > 0 ) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||
spannableString = new SpannableString(Html.fromHtml(account.getNote(), FROM_HTML_MODE_LEGACY));
|
||||
else
|
||||
spannableString = new SpannableString(Html.fromHtml(account.getNote()));
|
||||
|
||||
account.setNoteSpan(spannableString);
|
||||
account_note.setText(account.getNoteSpan(), TextView.BufferType.SPANNABLE);
|
||||
account_note.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
account.setNoteSpan(spannableString);
|
||||
account_note.setText(account.getNoteSpan(), TextView.BufferType.SPANNABLE);
|
||||
account_note.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
account_note.setVisibility(View.VISIBLE);
|
||||
}else{
|
||||
account_note.setVisibility(View.GONE);
|
||||
}
|
||||
Helper.loadGiF(ShowAccountActivity.this, account, account_pp);
|
||||
//Follow button
|
||||
String target = account.getAcct();
|
||||
|
@ -362,10 +362,11 @@ public class Helper {
|
||||
if (url.startsWith("/")) {
|
||||
url = Helper.getLiveInstance(context) + url;
|
||||
}
|
||||
|
||||
if( !url.startsWith("http")){
|
||||
url = "https://" + url;
|
||||
}
|
||||
try {
|
||||
Glide.with(imageView.getContext())
|
||||
.asDrawable()
|
||||
.load(url)
|
||||
.thumbnail(0.1f)
|
||||
.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)))
|
||||
|
Reference in New Issue
Block a user