fix(StatusDisplayItem): don't display self-referential quotes

This commit is contained in:
FineFindus 2024-07-06 12:53:38 +02:00
parent cdd9b0553f
commit 5fd2e322f6
No known key found for this signature in database
GPG Key ID: 64873EE210FF8E6B
1 changed files with 6 additions and 2 deletions

View File

@ -424,10 +424,14 @@ public abstract class StatusDisplayItem{
@Override
public void onSuccess(SearchResults results){
if (!results.statuses.isEmpty()){
status.quote=results.statuses.get(0);
Status quote=results.statuses.get(0);
// don't show self-referential quotes
if(!Objects.equals(status.id, results.statuses.get(0).id)){
status.quote=quote;
fragment.updateStatusWithQuote(status);
}
}
}
@Override
public void onError(ErrorResponse error){