use of com.ushahidi.android.app.models.ListPhotoModel in project Ushahidi_Android by ushahidi.
the class UploadPhotoAdapter method refresh.
/**
* @see com.ushahidi.android.app.adapters.BaseListAdapter#refresh()
*/
@Override
public void refresh() {
mListPhotoModel = new ListPhotoModel();
items = mListPhotoModel.getPendingPhotos(context);
this.setItems(items);
}
use of com.ushahidi.android.app.models.ListPhotoModel in project Ushahidi_Android by ushahidi.
the class ViewReportView method setListPhotos.
public void setListPhotos(int reportId) {
if (photo != null) {
ListPhotoModel mListPhotoModel = new ListPhotoModel();
final boolean loaded = mListPhotoModel.load(reportId);
int totalPhotos = mListPhotoModel.totalReportPhoto();
if (loaded) {
final List<PhotoEntity> items = mListPhotoModel.getPhotos();
if (items.size() > 0) {
getPhoto(items.get(0).getPhoto(), photo);
total.setText(context.getResources().getQuantityString(R.plurals.no_of_images, totalPhotos, totalPhotos));
} else {
photo.setVisibility(View.GONE);
total.setVisibility(View.GONE);
listPhotosEmptyView.setVisibility(View.VISIBLE);
}
}
}
}
use of com.ushahidi.android.app.models.ListPhotoModel in project Ushahidi_Android by ushahidi.
the class ListPhotoAdapter method refresh.
public void refresh(int reportId) {
mListPhotoModel = new ListPhotoModel();
final boolean loaded = mListPhotoModel.load(reportId);
totalPhotos = mListPhotoModel.totalReportPhoto();
if (loaded) {
items = mListPhotoModel.getPhotos();
this.setItems(items);
}
}
use of com.ushahidi.android.app.models.ListPhotoModel in project Ushahidi_Android by ushahidi.
the class UploadPhotoAdapter method refresh.
public void refresh(int reportId) {
mListPhotoModel = new ListPhotoModel();
items = mListPhotoModel.getPendingPhotosByReportId(reportId);
this.setItems(items);
}
use of com.ushahidi.android.app.models.ListPhotoModel in project Ushahidi_Android by ushahidi.
the class UploadPhotoAdapter method pendingPhotos.
public List<File> pendingPhotos(int reportId) {
mListPhotoModel = new ListPhotoModel();
items = mListPhotoModel.getPendingPhotosByReportId(reportId);
return getPhotos(items);
}
Aggregations