package com.quickblox.qmunicate.qb;

import android.app.Activity;
import android.widget.ImageView;

import com.nostra13.universalimageloader.core.ImageLoader;
import com.quickblox.internal.core.request.QBPagedRequestBuilder;
import com.quickblox.module.content.QBContent;
import com.quickblox.module.content.model.QBFile;
import com.quickblox.qmunicate.core.concurrency.BaseErrorAsyncTask;

public class QBLoadImageTask extends BaseErrorAsyncTask<Object, Void, QBFile> {

    private ImageView imageView;

    public QBLoadImageTask(Activity activity) {
        super(activity);
    }

    @Override
    public QBFile performInBackground(Object... params) throws Exception {
        Integer fileId = (Integer) params[0];
        imageView = (ImageView) params[1];

        QBPagedRequestBuilder builder = new QBPagedRequestBuilder();

        QBFile qbFile = new QBFile(fileId);
        qbFile = QBContent.getFile(qbFile);

        return qbFile;
    }

    @Override
    public void onResult(QBFile file) {
        ImageLoader.getInstance().displayImage(file.getPublicUrl(), imageView);
    }
}

@@ -156,74 +156,8 @@
 er;%0A
-import com.quickblox.internal.core.request.QBPagedRequestBuilder;%0A
 impo
@@ -696,78 +696,8 @@
 %5D;%0A%0A
-        QBPagedRequestBuilder builder = new QBPagedRequestBuilder();%0A%0A
     

clean QBLoadImageTask