Skip to content

Commit 5516721

Browse files
committed
Fix submit for review primary action
1 parent 8df8ed2 commit 5516721

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,14 +2223,6 @@ public void run() {
22232223
mPostEditorAnalyticsSession.setOutcome(Outcome.SAVE);
22242224
}
22252225

2226-
boolean hasFailedMediaUploads = mEditorFragment.hasFailedMediaUploads()
2227-
|| mFeaturedImageHelper.getFailedFeaturedImageUpload(mPost) != null;
2228-
if (!hasFailedMediaUploads) {
2229-
AppLog.d(T.POSTS, "User explicitly confirmed changes. Post Title: " + mPost.getTitle());
2230-
// the user explicitly confirmed an intention to upload the post
2231-
mPost.setChangesConfirmedContentHashcode(mPost.contentHashcode());
2232-
}
2233-
22342226
boolean postUpdateSuccessful = updatePostObject();
22352227
if (!postUpdateSuccessful) {
22362228
// just return, since the only case updatePostObject() can fail is when the editor
@@ -2241,6 +2233,15 @@ public void run() {
22412233

22422234
boolean isPublishable = PostUtils.isPublishable(mPost);
22432235

2236+
boolean hasFailedMediaUploads = mEditorFragment.hasFailedMediaUploads()
2237+
|| mFeaturedImageHelper.getFailedFeaturedImageUpload(mPost) != null;
2238+
2239+
if (!hasFailedMediaUploads) {
2240+
AppLog.d(T.POSTS, "User explicitly confirmed changes. Post Title: " + mPost.getTitle());
2241+
// the user explicitly confirmed an intention to upload the post
2242+
mPost.setChangesConfirmedContentHashcode(mPost.contentHashcode());
2243+
}
2244+
22442245
// if post was modified or has unsaved local changes and is publishable, save it
22452246
saveResult(isPublishable, false, false);
22462247

0 commit comments

Comments
 (0)