Skip to content

Commit

Permalink
fix(Search): display bot icon only for bots
Browse files Browse the repository at this point in the history
Due to the way Android handles lists, the icon could be wrongly shown on
non-bot accounts.

Fixes LucasGGamerM#418.
  • Loading branch information
FineFindus committed May 27, 2024
1 parent 18ac042 commit 71f1875
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,8 @@ public void onBind(AccountViewModel item){
pronouns.setVisibility(pronounsString.isPresent() ? View.VISIBLE : View.GONE);
pronounsString.ifPresent(p -> HtmlParser.setTextWithCustomEmoji(pronouns, p, item.account.emojis));

if(item.account.bot) {
botIcon.setVisibility(View.VISIBLE);
}

botIcon.setVisibility(item.account.bot ? View.VISIBLE : View.GONE);

/* unused in megalodon
boolean hasVerifiedLink=item.verifiedLink!=null;
if(!hasVerifiedLink)
Expand Down

0 comments on commit 71f1875

Please sign in to comment.