Search in sources :

Example 1 with ListCommentModel

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

the class CommentAdapter method refresh.

public void refresh(int reportId) {
    mListCommentModel = new ListCommentModel();
    final boolean loaded = mListCommentModel.load(reportId);
    if (loaded) {
        items = mListCommentModel.getCommentsByReportId(reportId);
        this.setItems(items);
    }
}
Also used : ListCommentModel(com.ushahidi.android.app.models.ListCommentModel)

Example 2 with ListCommentModel

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

the class ListCommentAdapter method refresh.

public void refresh(int reportId) {
    mListCommentModel = new ListCommentModel();
    final boolean loaded = mListCommentModel.load(reportId);
    totalComments = mListCommentModel.totalComments();
    if (loaded) {
        items = mListCommentModel.getComments();
        this.setItems(items);
    }
}
Also used : ListCommentModel(com.ushahidi.android.app.models.ListCommentModel)

Example 3 with ListCommentModel

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

the class FetchReports method clearCachedData.

/**
	 * Clear saved reports
	 */
public void clearCachedData() {
    // delete reports
    new ListReportModel().deleteReport();
    // delete comment data
    new ListCommentModel().deleteComments();
    // delete fetched photos
    ImageManager.deleteImages(this);
    // delete pending photos
    ImageManager.deletePendingImages(this);
    // delete Open GeoSMS reports
    Database.mOpenGeoSmsDao.deleteReports();
}
Also used : ListReportModel(com.ushahidi.android.app.models.ListReportModel) ListCommentModel(com.ushahidi.android.app.models.ListCommentModel)

Example 4 with ListCommentModel

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

the class CommentAdapter method refreshCheckinComment.

public void refreshCheckinComment(int checkinId) {
    mListCommentModel = new ListCommentModel();
    final boolean loaded = mListCommentModel.loadCheckinComment(checkinId);
    if (loaded) {
        items = mListCommentModel.getCommentsByCheckinId(checkinId);
        this.setItems(items);
    }
}
Also used : ListCommentModel(com.ushahidi.android.app.models.ListCommentModel)

Example 5 with ListCommentModel

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

the class ListCommentAdapter method refreshCheckinComment.

public void refreshCheckinComment(int checkinId) {
    mListCommentModel = new ListCommentModel();
    final boolean loaded = mListCommentModel.loadCheckinComment(checkinId);
    totalComments = mListCommentModel.totalComments();
    if (loaded) {
        items = mListCommentModel.getComments();
        this.setItems(items);
    }
}
Also used : ListCommentModel(com.ushahidi.android.app.models.ListCommentModel)

Aggregations

ListCommentModel (com.ushahidi.android.app.models.ListCommentModel)5 ListReportModel (com.ushahidi.android.app.models.ListReportModel)1