feat(search): show hashtag subtitles even if item.history is null
This commit is contained in:
parent
42ae74f1a7
commit
f76eba894a
|
@ -37,13 +37,14 @@ public class HashtagStatusDisplayItem extends StatusDisplayItem{
|
||||||
public void onBind(HashtagStatusDisplayItem _item){
|
public void onBind(HashtagStatusDisplayItem _item){
|
||||||
Hashtag item=_item.tag;
|
Hashtag item=_item.tag;
|
||||||
title.setText('#'+item.name);
|
title.setText('#'+item.name);
|
||||||
|
int numPeople = 0;
|
||||||
if(item.history != null){
|
if(item.history != null){
|
||||||
int numPeople=item.history.get(0).accounts;
|
numPeople=item.history.get(0).accounts;
|
||||||
if(item.history.size()>1)
|
if(item.history.size()>1)
|
||||||
numPeople+=item.history.get(1).accounts;
|
numPeople+=item.history.get(1).accounts;
|
||||||
subtitle.setText(_item.parentFragment.getResources().getQuantityString(R.plurals.x_people_talking, numPeople, numPeople));
|
|
||||||
chart.setData(item.history);
|
chart.setData(item.history);
|
||||||
}
|
}
|
||||||
|
subtitle.setText(_item.parentFragment.getResources().getQuantityString(R.plurals.x_people_talking, numPeople, numPeople));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue