Search in sources :

Example 1 with AddReportModel

use of com.ushahidi.android.app.models.AddReportModel in project Ushahidi_Android by ushahidi.

the class ListReportFragment method deletePendingReport.

private void deletePendingReport(int reportId) {
    // make sure it's an existing report
    AddReportModel model = new AddReportModel();
    UploadPhotoAdapter pendingPhoto = new UploadPhotoAdapter(getActivity());
    if (reportId > 0) {
        if (model.deleteReport(reportId)) {
            // delete images
            for (int i = 0; i < pendingPhoto.getCount(); i++) {
                ImageManager.deletePendingPhoto(getActivity(), "/" + pendingPhoto.getItem(i).getPhoto());
            }
        }
    }
}
Also used : UploadPhotoAdapter(com.ushahidi.android.app.adapters.UploadPhotoAdapter) AddReportModel(com.ushahidi.android.app.models.AddReportModel)

Aggregations

UploadPhotoAdapter (com.ushahidi.android.app.adapters.UploadPhotoAdapter)1 AddReportModel (com.ushahidi.android.app.models.AddReportModel)1