diff --git a/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.kt b/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.kt index 6933c9c0bf12..2090abec6cd0 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/posts/EditPostActivity.kt @@ -3813,7 +3813,9 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm @Subscribe(threadMode = ThreadMode.MAIN) fun onPostUploaded(event: OnPostUploaded) { val post: PostModel? = event.post - if (post != null && post.id == editPostRepository.id) { + val editPostId = editPostRepository.getPost()?.id + + if (post != null && post.id == editPostId) { if (!isRemotePreviewingFromEditor) { // We are not remote previewing a post: show snackbar and update post status if needed val snackbarAttachView = findViewById(R.id.editor_activity)