Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix upload notification not shown on retry #9956

Merged
merged 6 commits into from
Jun 7, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,6 @@ private void retryUpload(PostModel post, boolean processWithAztec) {

Set<MediaModel> failedMedia = mUploadStore.getFailedMediaForPost(post);
ArrayList<MediaModel> mediaToRetry = new ArrayList<>(failedMedia);
mPostUploadNotifier.removePostInfoFromForegroundNotificationData(post, mediaToRetry);
if (!failedMedia.isEmpty()) {
// reset these media items to QUEUED
for (MediaModel media : failedMedia) {
Expand Down Expand Up @@ -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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch here - it definitely seems the right place where to add it

// retry uploading the Post
mPostUploadHandler.upload(post);
}
Expand Down