use of org.wordpress.android.fluxc.store.MediaStore.MediaPayload in project WordPress-Android by wordpress-mobile.
the class MediaUploadService method dispatchUploadAction.
private void dispatchUploadAction(@NonNull final MediaModel media) {
AppLog.i(AppLog.T.MEDIA, "Dispatching upload action for media with local id: " + media.getId() + " and path: " + media.getFilePath());
media.setUploadState(UploadState.UPLOADING.name());
mDispatcher.dispatch(MediaActionBuilder.newUpdateMediaAction(media));
MediaPayload payload = new MediaPayload(mSite, media);
mDispatcher.dispatch(MediaActionBuilder.newUploadMediaAction(payload));
}
use of org.wordpress.android.fluxc.store.MediaStore.MediaPayload in project WordPress-Android by wordpress-mobile.
the class MediaDeleteService method dispatchDeleteAction.
private void dispatchDeleteAction(@NonNull MediaModel media) {
AppLog.v(T.MEDIA, "Deleting " + media.getTitle() + " (id=" + media.getMediaId() + ")");
MediaPayload payload = new MediaPayload(mSite, media);
mDispatcher.dispatch(MediaActionBuilder.newDeleteMediaAction(payload));
}
use of org.wordpress.android.fluxc.store.MediaStore.MediaPayload in project WordPress-Android by wordpress-mobile.
the class EditPostActivity method onMediaUploadCancelClicked.
@Override
public void onMediaUploadCancelClicked(String mediaId, boolean delete) {
MediaModel media = new MediaModel();
media.setMediaId(Long.valueOf(mediaId));
MediaPayload payload = new MediaPayload(mSite, media);
mDispatcher.dispatch(MediaActionBuilder.newCancelMediaUploadAction(payload));
}
use of org.wordpress.android.fluxc.store.MediaStore.MediaPayload in project WordPress-Android by wordpress-mobile.
the class EditPostActivity method updateMediaFileOnServer.
private void updateMediaFileOnServer(MediaFile mediaFile) {
if (mediaFile == null) {
return;
}
MediaPayload payload = new MediaPayload(mSite, FluxCUtils.mediaModelFromMediaFile(mediaFile));
mDispatcher.dispatch(MediaActionBuilder.newPushMediaAction(payload));
}
use of org.wordpress.android.fluxc.store.MediaStore.MediaPayload in project WordPress-Android by wordpress-mobile.
the class MediaUploadService method dispatchCancelAction.
private void dispatchCancelAction(@NonNull final MediaModel media) {
AppLog.i(AppLog.T.MEDIA, "Dispatching cancel upload action for media with local id: " + media.getId() + " and path: " + media.getFilePath());
MediaPayload payload = new MediaPayload(mSite, mCurrentUpload);
mDispatcher.dispatch(MediaActionBuilder.newCancelMediaUploadAction(payload));
}
Aggregations