From 3b0c40c335ebaf924c4fa00149b411a13db5ba33 Mon Sep 17 00:00:00 2001 From: malinajirka Date: Wed, 29 May 2019 09:41:20 +0200 Subject: [PATCH 1/4] Fix upload notification not shown on retry --- .../java/org/wordpress/android/ui/uploads/UploadService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/uploads/UploadService.java b/WordPress/src/main/java/org/wordpress/android/ui/uploads/UploadService.java index 8c6609884208..71ec7531eb7d 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/uploads/UploadService.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/uploads/UploadService.java @@ -755,7 +755,6 @@ private void retryUpload(PostModel post, boolean processWithAztec) { Set failedMedia = mUploadStore.getFailedMediaForPost(post); ArrayList mediaToRetry = new ArrayList<>(failedMedia); - mPostUploadNotifier.removePostInfoFromForegroundNotificationData(post, mediaToRetry); if (!failedMedia.isEmpty()) { // reset these media items to QUEUED for (MediaModel media : failedMedia) { @@ -784,6 +783,7 @@ private void retryUpload(PostModel post, boolean processWithAztec) { // send event so Editors can handle clearing Failed statuses properly if Post is being edited right now EventBus.getDefault().post(new UploadService.UploadMediaRetryEvent(mediaToRetry)); } else { + mPostUploadNotifier.addPostInfoToForegroundNotification(post, null); // retry uploading the Post mPostUploadHandler.upload(post); } From 407dd9934c11bd71e3177c5714ee84902d06af28 Mon Sep 17 00:00:00 2001 From: malinajirka Date: Wed, 29 May 2019 10:21:33 +0200 Subject: [PATCH 2/4] Update release notes --- RELEASE-NOTES.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 5827e79974ed..ba0dba85d8f8 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,6 +1,7 @@ 12.6 ----- * Local draft pages will be automatically uploaded to the server as soon as an internet connection is available. +* Show upload in progress notification when retrying 12.5 From e0c18f7074c7045aaca3353db2fb9e7cdbe8eb8d Mon Sep 17 00:00:00 2001 From: malinajirka Date: Mon, 3 Jun 2019 09:40:57 +0200 Subject: [PATCH 3/4] Fix issues in post and media upload --- .../org/wordpress/android/ui/uploads/PostUploadHandler.java | 2 ++ .../java/org/wordpress/android/ui/uploads/UploadService.java | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/uploads/PostUploadHandler.java b/WordPress/src/main/java/org/wordpress/android/ui/uploads/PostUploadHandler.java index 52e4cd8e1682..89450ade7355 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/uploads/PostUploadHandler.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/uploads/PostUploadHandler.java @@ -573,6 +573,8 @@ public void onPostUploaded(OnPostUploaded event) { String errorMessage = mUiHelpers.getTextOfUiString(context, UploadUtils.getErrorMessageResIdFromPostError(event.post.isPage(), event.error)); String notificationMessage = UploadUtils.getErrorMessage(context, event.post, errorMessage, false); + mPostUploadNotifier.removePostInfoFromForegroundNotification(event.post, + mMediaStore.getMediaForPost(event.post)); mPostUploadNotifier.incrementUploadedPostCountFromForegroundNotification(event.post); mPostUploadNotifier.updateNotificationErrorForPost(event.post, site, notificationMessage, 0); sFirstPublishPosts.remove(event.post.getId()); diff --git a/WordPress/src/main/java/org/wordpress/android/ui/uploads/UploadService.java b/WordPress/src/main/java/org/wordpress/android/ui/uploads/UploadService.java index 0fbcb0033491..8820a0309024 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/uploads/UploadService.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/uploads/UploadService.java @@ -248,10 +248,7 @@ private void unpackPostIntent(@NonNull Intent intent) { return; } boolean postHasGutenbergBlocks = PostUtils.contentContainsGutenbergBlocks(post.getContent()); - boolean processWithAztec = - AppPrefs.isAztecEditorEnabled() && !AppPrefs.isGutenbergEditorEnabled() - && !postHasGutenbergBlocks; - retryUpload(post, processWithAztec); + retryUpload(post, !postHasGutenbergBlocks); } else { ToastUtils.showToast(this, R.string.retry_needs_aztec); } From f19cb437e582e5d6c485fa5044013d3b76374536 Mon Sep 17 00:00:00 2001 From: malinajirka Date: Thu, 6 Jun 2019 09:18:05 +0200 Subject: [PATCH 4/4] Update release notes --- RELEASE-NOTES.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 493003c04eab..a9508282bf9d 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -1,11 +1,11 @@ 12.7 ----- +* Show upload in progress notification when retrying 12.6 ----- * Add Insights management introductory card * Local draft pages will be automatically uploaded to the server as soon as an internet connection is available. -* Show upload in progress notification when retrying * Block Editor: A new block is available: video block. * Block Editor: Added UI to display a warning when a block has invalid content.