예제 #1
0
  @Override
  protected void oldMsgLoaderSuccessCallback(MessageListBean oldValue) {
    if (Utility.isAllNotNull(getActivity(), oldValue) && oldValue.getSize() > 1) {
      getList().addOldData(oldValue);
      putToGroupDataMemoryCache(currentGroupId, getList());
      FriendsTimeLineDBTask.asyncReplace(getList(), accountBean.getUid(), currentGroupId);

    } else if (Utility.isAllNotNull(getActivity())) {
      Toast.makeText(getActivity(), getString(R.string.older_message_empty), Toast.LENGTH_SHORT)
          .show();
    }
  }
예제 #2
0
 @Override
 protected void newMsgLoaderSuccessCallback(MessageListBean newValue, Bundle loaderArgs) {
   if (Utility.isAllNotNull(getActivity(), newValue) && newValue.getSize() > 0) {
     if (loaderArgs != null && loaderArgs.getBoolean(BundleArgsConstants.AUTO_REFRESH, false)) {
       addNewDataAndRememberPositionAutoRefresh(newValue);
     } else {
       boolean scrollToTop = SettingUtility.isReadStyleEqualWeibo();
       if (scrollToTop) {
         addNewDataWithoutRememberPosition(newValue);
       } else {
         addNewDataAndRememberPosition(newValue);
       }
     }
     putToGroupDataMemoryCache(currentGroupId, getList());
     FriendsTimeLineDBTask.asyncReplace(getList(), accountBean.getUid(), currentGroupId);
   }
 }