refactor(HeaderStatusDisplayItem): add bot icon to username

This commit is contained in:
FineFindus 2023-01-04 17:24:53 +01:00
parent 75db9f4623
commit 8ed88b2b29
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
1 changed files with 4 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import android.os.Build;
import android.os.Bundle;
import android.text.SpannableStringBuilder;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.SubMenu;
@ -267,6 +268,9 @@ public class HeaderStatusDisplayItem extends StatusDisplayItem{
public void onBind(HeaderStatusDisplayItem item){
name.setText(item.parsedName);
username.setText('@'+item.user.acct);
username.setCompoundDrawablesWithIntrinsicBounds(item.user.bot ? R.drawable.ic_fluent_bot_24_filled : 0, 0, 0, 0);
if (item.scheduledStatus!=null)
if (item.scheduledStatus.scheduledAt.isAfter(CreateStatus.DRAFTS_AFTER_INSTANT)) {
timestamp.setText(R.string.sk_draft);