From b89d5c4ce8caf357b5c0118300e8d07d4521f696 Mon Sep 17 00:00:00 2001 From: Mario Zorz Date: Tue, 24 Oct 2017 17:17:32 -0300 Subject: [PATCH 1/2] add isFailed check to make sure we don't show a progress bar when the UploadStore knows this is Post is failed already --- .../wordpress/android/ui/posts/adapters/PostsListAdapter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/adapters/PostsListAdapter.java b/WordPress/src/main/java/org/wordpress/android/ui/posts/adapters/PostsListAdapter.java index 5a46e3855caf..2a1730bd73c8 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/posts/adapters/PostsListAdapter.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/adapters/PostsListAdapter.java @@ -418,7 +418,8 @@ public void onItemClick(AdapterView parent, View view, int position, long id) } private void updatePostUploadProgressBar(ProgressBar view, PostModel post) { - if (UploadService.isPostUploadingOrQueued(post) || UploadService.hasInProgressMediaUploadsForPost(post)) { + if (mUploadStore.isFailedPost(post) && + (UploadService.isPostUploadingOrQueued(post) || UploadService.hasInProgressMediaUploadsForPost(post))) { view.setVisibility(View.VISIBLE); int overallProgress = Math.round(UploadService.getMediaUploadProgressForPost(post) * 100); // Sometimes the progress bar can be stuck at 100% for a long time while further processing happens From ca0416a99c408d1d0c5cf4b10c3fa1bcd4344185 Mon Sep 17 00:00:00 2001 From: Mario Zorz Date: Tue, 24 Oct 2017 17:38:40 -0300 Subject: [PATCH 2/2] forgot to negate the isFailedPost check --- .../wordpress/android/ui/posts/adapters/PostsListAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/adapters/PostsListAdapter.java b/WordPress/src/main/java/org/wordpress/android/ui/posts/adapters/PostsListAdapter.java index 2a1730bd73c8..2ef9330c1e29 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/posts/adapters/PostsListAdapter.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/adapters/PostsListAdapter.java @@ -418,7 +418,7 @@ public void onItemClick(AdapterView parent, View view, int position, long id) } private void updatePostUploadProgressBar(ProgressBar view, PostModel post) { - if (mUploadStore.isFailedPost(post) && + if (!mUploadStore.isFailedPost(post) && (UploadService.isPostUploadingOrQueued(post) || UploadService.hasInProgressMediaUploadsForPost(post))) { view.setVisibility(View.VISIBLE); int overallProgress = Math.round(UploadService.getMediaUploadProgressForPost(post) * 100);