@Override protected void onNewMsgLoaderSuccessCallback(CommentListBean newValue, Bundle loaderArgs) { if (newValue != null && newValue.getItemList() != null && newValue.getItemList().size() > 0) { addNewDataAndRememberPosition(newValue); } unreadBean = null; NotificationManager notificationManager = (NotificationManager) getActivity().getSystemService(Context.NOTIFICATION_SERVICE); notificationManager.cancel( NotificationServiceHelper.getCommentsToMeNotificationId( BeeboApplication.getInstance().getAccountBean())); }
@Override protected void onOldMsgLoaderSuccessCallback(CommentListBean newValue) { if (newValue != null && newValue.getItemList().size() > 1) { getDataList().addOldData(newValue); getAdapter().notifyDataSetChanged(); CommentToMeTimeLineDBTask.asyncReplace(getDataList(), accountBean.getUid()); } }
protected void clearAndReplaceValue(CommentListBean value) { getDataList().getItemList().clear(); getDataList().getItemList().addAll(value.getItemList()); }