use of org.qii.weiciyuan.bean.MessageReCmtCountBean in project weiciyuan by qii.
the class FriendsTimeLineFragment method updateTimeLineMessageCommentAndRepostData.
private void updateTimeLineMessageCommentAndRepostData(List<MessageReCmtCountBean> value) {
if (value == null) {
return;
}
HashMap<String, MessageReCmtCountBean> messageReCmtCountBeanHashMap = new HashMap<String, MessageReCmtCountBean>();
for (MessageReCmtCountBean count : value) {
messageReCmtCountBeanHashMap.put(count.getId(), count);
}
for (int i = 0; i < getList().getSize(); i++) {
MessageBean msg = getList().getItem(i);
if (msg == null) {
continue;
}
MessageReCmtCountBean count = messageReCmtCountBeanHashMap.get(msg.getId());
if (count != null) {
msg.setReposts_count(count.getReposts());
msg.setComments_count(count.getComments());
}
}
getAdapter().notifyDataSetChanged();
FriendsTimeLineDBTask.asyncReplace(getList(), accountBean.getUid(), currentGroupId);
}
Aggregations