Exemplo n.º 1
0
  /**
   * @Title: deleteFavort @Description: 取消点赞
   *
   * @param @param circlePosition
   * @param @param favortId
   * @return void 返回类型
   * @throws
   */
  public void deleteFavort(final int circlePosition, final String favortId) {
    mCircleModel.deleteFavort(
        new IDataRequestListener() {

          @Override
          public void loadSuccess(Object object) {
            getView().update2DeleteFavort(circlePosition, favortId);
          }
        });
  }
Exemplo n.º 2
0
  /**
   * @Title: deleteCircle @Description: 删除动态
   *
   * @param circleId
   * @return void 返回类型
   * @throws
   */
  public void deleteCircle(final String circleId) {
    mCircleModel.deleteCircle(
        new IDataRequestListener() {

          @Override
          public void loadSuccess(Object object) {
            getView().update2DeleteCircle(circleId);
          }
        });
  }
Exemplo n.º 3
0
  /**
   * @Title: addFavort @Description: 点赞
   *
   * @param circlePosition
   * @return void 返回类型
   * @throws
   */
  public void addFavort(final int circlePosition) {
    mCircleModel.addFavort(
        new IDataRequestListener() {

          @Override
          public void loadSuccess(Object object) {
            FavortItem item = DatasUtil.createCurUserFavortItem();
            getView().update2AddFavorite(circlePosition, item);
          }
        });
  }
Exemplo n.º 4
0
  /**
   * @Title: addComment @Description: 增加评论
   *
   * @param content
   * @param config CommentConfig
   * @return void 返回类型
   * @throws
   */
  public void addComment(final String content, final CommentConfig config) {
    if (config == null) {
      return;
    }
    mCircleModel.addComment(
        new IDataRequestListener() {

          @Override
          public void loadSuccess(Object object) {
            CommentItem newItem = null;
            if (config.commentType == CommentConfig.Type.PUBLIC) {
              newItem = DatasUtil.createPublicComment(content);
            } else if (config.commentType == CommentConfig.Type.REPLY) {
              newItem = DatasUtil.createReplyComment(config.replyUser, content);
            }

            getView().update2AddComment(config.circlePosition, newItem);
          }
        });
  }