Skip to content
Merged
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,21 @@ private void initializePostObject() {
mOriginalPostHadLocalChangesOnOpen = mOriginalPost.isLocallyChanged();
mPost = UploadService.updatePostWithCurrentlyCompletedUploads(mPost);
if (mShowAztecEditor) {
mMediaMarkedUploadingOnStartIds =
AztecEditorFragment.getMediaMarkedUploadingInPostContent(this, mPost.getContent());
Collections.sort(mMediaMarkedUploadingOnStartIds);
try {
mMediaMarkedUploadingOnStartIds =
AztecEditorFragment.getMediaMarkedUploadingInPostContent(this, mPost.getContent());
Collections.sort(mMediaMarkedUploadingOnStartIds);
} catch (NumberFormatException err) {
// see: https://github.com/wordpress-mobile/AztecEditor-Android/issues/805
if (getSite() != null && getSite().isWPCom() && !getSite().isPrivate()
&& TextUtils.isEmpty(mPost.getPassword())
&& !PostStatus.PRIVATE.toString().equals(mPost.getStatus())) {
AppLog.e(T.EDITOR, "There was an error initializing post object!");
AppLog.e(AppLog.T.EDITOR, "HTML content of the post before the crash:");
AppLog.e(AppLog.T.EDITOR, mPost.getContent());
throw err;
}
}
}
mIsPage = mPost.isPage();

Expand Down